Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordpress /wp-json malfunction #8

Open
manzu opened this issue Mar 26, 2023 · 3 comments
Open

Wordpress /wp-json malfunction #8

manzu opened this issue Mar 26, 2023 · 3 comments

Comments

@manzu
Copy link

manzu commented Mar 26, 2023

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 /wp-json/ now working but Site Health and Jetpack still fail

@manzu manzu changed the title Wordpress /wp-json Wordpress /wp-json malfunction Mar 26, 2023
@manzu
Copy link
Author

manzu commented Mar 27, 2023

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

@manzu
Copy link
Author

manzu commented Apr 3, 2023

disregard my last comment. the Cookie headers containing authorization are being sent.

also the handle_path directive is not needed

@staudenmeir
Copy link

@manzu Are you still having this issue? I can't reproduce it with the current version of this repository and WordPress 6.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants