Repository navigation
Trust reverse-proxy forwarded headers via TRUSTED_PROXIES env - #125
Merged
Merged
Conversation
Behind a TLS-terminating proxy the app generated http:// asset URLs on
https:// pages (mixed content, CSS blocked). The framework TrustProxies
middleware already falls back to config('trustedproxy.proxies'); wire
that to a TRUSTED_PROXIES env var so each environment names its proxy
('*' for dev, real IPs for production).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SiPqbs7bBFiArAZBunrgsn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cryptozing.dev.n8bar.onlinedev domain), the app generatedhttp://asset URLs onhttps://pages — browsers blocked them as mixed content, so CSS never loaded.TrustProxiesmiddleware already falls back toconfig('trustedproxy.proxies'); this addsconfig/trustedproxy.phpwiring that to a newTRUSTED_PROXIESenv var (comma-separated IPs/CIDRs, or*to trust the directly connecting client)..env.exampledocuments the var (empty default = trust nothing, current behavior). Dev sets*locally; production at MS21 should set its actual proxy.Test plan
tests/Feature/TrustedProxiesTest.php: forwarded proto honored when trusted, ignored when not.https://asset links and styles load.🤖 Generated with Claude Code
https://claude.ai/code/session_01SiPqbs7bBFiArAZBunrgsn