# fideloper/TrustedProxy

Laravel Proxy Package for handling sessions when behind load balancers or other intermediaries.

Repository: https://github.com/fideloper/TrustedProxy
Canonical: https://ross.abutalabs.com/products/trustedproxy
Language: PHP
License: MIT
License Family: permissive
Last push: 2024-01-09T20:39:37+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4873, "days_push": 967, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7307, forks 126 (observed 2026-08-28T04:09:58.140975+00:00)

## What it is
A Laravel package that configures trusted proxies so applications behind load balancers or reverse proxies correctly interpret X-Forwarded headers. It enables proper URL generation, redirects, session handling, and logging when requests pass through intermediaries like Nginx, HAProxy, ELB, CloudFlare, or Varnish.

## Use cases
- fix incorrect URLs and redirects in Laravel behind a load balancer
- trust X-Forwarded-For headers from a known proxy IP
- handle sessions correctly when behind CloudFlare or Varnish
- get the real client IP in Laravel behind a reverse proxy
- make Laravel respect X-Forwarded-Proto for HTTPS detection
- configure trusted proxies for ELB or HAProxy

## When to choose
- you run Laravel 4 through 8 behind a load balancer, CDN, or reverse proxy
- your Laravel app generates wrong URLs or sees the proxy IP instead of the client IP

## When to avoid
- you use Laravel 9 or newer, which has trusted proxy support built into the framework
- your application is not Laravel/Symfony-based

## Facets
- artifact type: library
- maturity: maintenance
- function: middleware, security, http-server
- domain: web-development, backend, security, networking
- platform: php, self-hosted
- tags: laravel, reverse-proxy, x-forwarded-headers, load-balancer, symfony, web-server

## Member repositories
- fideloper/TrustedProxy (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:58.140975+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:38:41.414764+00:00, confidence not recorded.
  - readme: https://github.com/fideloper/TrustedProxy (fetched 2026-08-28T04:09:58.140975+00:00, sha a9c49e17c238)
- Data as of 2026-08-30T08:39:29.467469+00:00.
