Skip to content

Trust reverse-proxy forwarded headers via TRUSTED_PROXIES env - #125

Merged
n8bar merged 1 commit into
mainfrom
claude/trusted-proxies
Jul 14, 2026
Merged

n8bar merged 1 commit into
mainfrom
claude/trusted-proxies

Conversation

@n8bar

@n8bar n8bar commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • Behind a TLS-terminating reverse proxy (e.g. the cryptozing.dev.n8bar.online dev domain), the app generated http:// asset URLs on https:// pages — browsers blocked them as mixed content, so CSS never loaded.
  • The framework's built-in TrustProxies middleware already falls back to config('trustedproxy.proxies'); this adds config/trustedproxy.php wiring that to a new TRUSTED_PROXIES env var (comma-separated IPs/CIDRs, or * to trust the directly connecting client).
  • .env.example documents 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.
  • Full suite: 383 passed (1834 assertions).
  • Verified live: dev domain now emits https:// asset links and styles load.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SiPqbs7bBFiArAZBunrgsn

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
@n8bar
n8bar merged commit 6851a4c into main Jul 14, 2026
1 check passed
@n8bar
n8bar deleted the claude/trusted-proxies branch July 14, 2026 03:51
Repository owner deleted a comment from chatgpt-codex-connector Bot Jul 18, 2026
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

Successfully merging this pull request may close these issues.

1 participant