Asset URL behind proxy server #48793
Replies: 2 comments
-
For anyone wondering how to solve this: In my case the second proxy was overwriting the X-Forwarded-Host from the first proxy which led to the described problems. |
Beta Was this translation helpful? Give feedback.
0 replies
-
In Proxy setting use $http_host , in place of $host.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I deployed my Laravel App to an enterprise environment in production. The app and all related services are running as docker services. Because of different networking segments the app can be reached internally and externally using different DNS names. For this I use nginx as a proxy server which proxy-passes external DNS requests to the internal Laravel app.
Now I have the following problem:
How can I tell Laravel that asset's should be served using the requesting hostname? I can't just set the ASSET_URL environment variable, because the DNS name is different depending on the network I make the request from. So the asset url is dynamic not static.
Beta Was this translation helpful? Give feedback.
All reactions