-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Trouble with FrankenPHP in worker mode behind load balancer #1219
Comments
Hi @dfsoeten! I encountered the same problem today. In my case, the problem was in Caddy not trusting the proxies above (see https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults). |
Hey, thanks for your reply. I don't see how this solves the issue. Primarly because FrankenPHP works as expected when not running in worker mode. To me it seems that confirms my configuration (FrankenPHP, Google Cloud LB, Symfony) have been configured properly. Just in case I gave it a shot by configuring the following environment variable: Thanks regardless for your input! I'm open to any further ideas. |
@dfsoeten any progress on this? We experiencing same behaviour for our symfony application. |
@wiseguy1394 no I haven't managed to figured out the root cause as of yet. |
Hey all!
Currently I'm trying to setup FrankenPHP for my Shopware application after having great success with it in other Symonfy based applications. Everything works as expected when not using the worker mode.
After installing the FrankenPHP runtime and setting the
FRANKENPHP_CONFIG
toworker ./public/index.php
andAPP_RUNTIME
toRuntime\\FrankenPhpSymfony\\Runtime
theSymfony\Component\Routing\Generator\UrlGenerator
generates HTTP urls instead of the HTTPS urls.Showpare itself seems to already utilze the Symfony runtime component but usally does so using Caddy + PHP FPM. My
public/index.php
file is identical to the one being used here.After thoroughly consulting Symfony's docs about configuring my Shopware application behind a load balancer, I am still unable to figure out exactly why the generated urls are using HTTP only when using FrankenPHP's worker mode. I have debugged locally to confirm that Shopware's kernel is acutally passed into the FrankenPHP runtime.
I've also made sure that my application receives the
X-Forwarded-For
andX-Forwarded-Proto
headers by the Google Cloud Load Balancer.Some help would be greatly appriciated!
The text was updated successfully, but these errors were encountered: