-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
Help wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.Routing
Description
Description
Some HTTP reverse-proxy (at least Traefik), send a X_FORWARDED_PREFIX header to backend (here, a Symfony application running on Nginx), if routing configuration use a Path (see example below).
But Symfony ignores it, hence, all routes are broken.
Look like this is possible for CLI, via the router.request_context.base_url
parameter (see https://symfony.com/doc/4.1/console/request_context.html).
(Or I missed something about how to configure Symfony behind a reverse-proxy with a path prefix).
Example
- Public URL is "https://mysite.com/admin/login"
- Reverse-proxy rules:
https => http
, route/admin/(.*) => symfony backend /$1
- Symfony backend receives
/login
, hence match/login
route (which is OK) - Symfony backend must generate
/admin/login
forlogin
route
vince83110, smoench and stondbringa
Metadata
Metadata
Assignees
Labels
Help wantedIssues and PRs which are looking for volunteers to complete them.Issues and PRs which are looking for volunteers to complete them.Routing