docs: clarify GET requires query token, POST accepts header token in permission docblock

This commit is contained in:
opencode
2026-08-03 21:47:05 +08:00
parent 60bc6dbf3a
commit cae4853696

View File

@@ -23,7 +23,11 @@ class Peptide_News_Rest_Worker {
/**
* Check whether the incoming request is authenticated as an admin
* OR bears a valid VPS worker secret token in X-Peptide-News-Token header.
* OR bears a valid VPS worker secret token.
*
* GET requests (pending) require the token as a query parameter so
* cached responses are namespaced by the secret; POST requests accept
* the X-Peptide-News-Token header (or query token) or an admin session.
*
* @param WP_REST_Request $request
* @return bool|WP_Error