fix: prevent LiteSpeed caching of /worker/* REST responses

This commit is contained in:
opencode
2026-08-03 20:53:22 +08:00
parent 7d2f795f99
commit aa9e12faef

View File

@@ -29,6 +29,9 @@ class Peptide_News_Rest_Worker {
* @return bool|WP_Error
*/
public function check_worker_permissions( $request ) {
nocache_headers();
header( 'X-LiteSpeed-Cache-Control: no-cache' );
if ( current_user_can( 'manage_options' ) ) {
return true;
}