wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



rest_allowed_cors_headers › Filtr WordPress Hooks

Od6.3.0
Przestarzałyn/a
› apply_filters( 'rest_allowed_cors_headers', $allow_headers, $request )
Parametry: (2)
  • () allow_headers The list of request headers to allow.
    Wymagane: Tak
  • () request The request in context.
    Wymagane: Tak
Zdefiniowane na:
Codex:

Filters the list of request headers that are allowed for REST API CORS requests.

The allowed headers are passed to the browser to specify which headers can be passed to the REST API. By default, we allow the Content-* headers needed to upload files to the media endpoints. As well as the Authorization and Nonce headers for allowing authentication.




Źródło

$allow_headers = apply_filters( 'rest_allowed_cors_headers', $allow_headers, $request );