frankenphp-wordpress
frankenphp-wordpress copied to clipboard
Wordpress /wp-json malfunction
The Wordpress REST API under the uri path /wp-json doesn't work under FrankenPHP with the included Caddyfile. Because of this you can't use the Jetpack plugin and probably other things also. Another symptom of this is that Tools > Site Health reports problems.
Might be related to PHP 8.2 / Wordpress which is beta support still
Adding
handle_path /wp-json/* {
uri strip_prefix /wp-json
rewrite index.php?rest_route={uri}
}
to the Caddyfile helps in
With this solution I think we may need to pass the Authorization header with a module like https://caddyserver.com/docs/modules/http.handlers.authp
disregard my last comment. the Cookie headers containing authorization are being sent.
also the handle_path directive is not needed
@manzu Are you still having this issue? I can't reproduce it with the current version of this repository and WordPress 6.4.3.