-
Hello, What I don't understand is that the X-Forwarded-Proto headers are set, but PHP still don't understand it's secure. I tried multiple things like proxying to the 443 port, or disabling the 443 entirely but I still had no luck. For the Caddyfile, I'm following the one from the frankenphp-wordpress template
I'm probably doing something wrong, but I can't even figure out if it's on the nginx side, caddy side or php config side. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Did you add your proxy to the trusted list? https://caddyserver.com/docs/caddyfile/options#trusted-proxies |
Beta Was this translation helpful? Give feedback.
-
Also, did you tell WordPress that it is running securely? Make sure WP_HOME is set to an HTTPS URL in your wp-config.php. This is the only variable used to generate links in WordPress, so if it is set to |
Beta Was this translation helpful? Give feedback.
Thank you for the help! I did trusted the proxy. I finally found a fix ! Wordpress doesn't recognize "Forwarded" header natively, it only checks the $_SERVER["SERVER_PORT"] which is "80" in my case. The documentation indicate a solution, but it was hard to find!
https://developer.wordpress.org/reference/functions/is_ssl/