nginx-proxy-manager/backend/templates
jerry-yuan 187d21a0d5 feat: add trust_forwarded_proto option for SSL redirect handling in reverse proxy scenarios
When Nginx is behind another proxy server (like CloudFlare or AWS ALB), the force-SSL
feature can cause redirect loops because Nginx sees the connection as plain HTTP
while SSL is already handled upstream. This adds a new boolean option to trust
the X-Forwarded-Proto header from upstream proxies.

Changes:
- Add `trust_forwarded_proto` column to proxy_host table (migration)
- Update model and API schema to support the new boolean field
- Modify force-ssl Nginx template to check X-Forwarded-Proto/X-Forwarded-Scheme
- Add map directives in nginx.conf to validate and sanitize forwarded headers
- Add advanced option toggle in frontend UI with i18n support (EN/ZH)
- Set proxy headers from validated map variables instead of $scheme

This allows administrators to control SSL redirect behavior when Nginx is deployed
behind a TLS-terminating proxy.
2026-01-31 13:11:47 +00:00
..
_access.conf Update _access.conf to ensure Authorization header remove when pass_auth = false or 0 2025-11-09 21:02:18 +01:00
_assets.conf v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
_certificates.conf Add SSL certificate to TCP streams if certificate in database 2025-02-04 17:12:04 +10:00
_certificates_stream.conf Fix whitespace in nginx stream config 2025-02-04 17:14:07 +10:00
_exploits.conf v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
_forced_ssl.conf feat: add trust_forwarded_proto option for SSL redirect handling in reverse proxy scenarios 2026-01-31 13:11:47 +00:00
_header_comment.conf v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
_hsts.conf only add hsts header with https. 2023-12-02 03:26:34 +01:00
_hsts_map.conf only add hsts header with https. 2023-12-02 03:26:34 +01:00
_listen.conf http2 directive 2024-10-24 01:30:14 +03:00
_location.conf Cleaning unused variable. 2024-10-28 15:18:54 +03:00
dead_host.conf Add custom configuration to dead_host.conf 2024-12-20 00:59:26 +01:00
default.conf Add support for nginx 444 default response 2023-05-22 11:59:50 +10:00
ip_ranges.conf v2.1.0 (#293) 2020-02-19 15:55:06 +11:00
letsencrypt-request.conf All logs in single folder 2021-06-29 23:07:54 +02:00
proxy_host.conf only add hsts header with https. 2023-12-02 03:26:34 +01:00
redirection_host.conf only add hsts header with https. 2023-12-02 03:26:34 +01:00
stream.conf Added logging for streams based on port 2025-12-30 21:44:29 -08:00