feat: add reverse proxy support with X-Forwarded-Host header handling for agent installer URL generation
CI / backend (push) Failing after 3s
CI / frontend (push) Failing after 27s

Add external_base_url helper to detect base URL from X-Forwarded-Host and X-Forwarded-Proto headers with fallback to request.base_url, replace hardcoded request.base_url usage in node_agent_install, node_agent_install_info, and public_node_agent_install endpoints to support reverse proxy deployments, update nginx config to pass X-Forwarded-Host header and use $http_host instead of $host for proper hostname forw
This commit is contained in:
2026-07-09 14:21:11 +02:00
parent e67174a4ae
commit ffc69011c4
2 changed files with 14 additions and 6 deletions
+3 -3
View File
@@ -4,9 +4,10 @@ server {
location /api/ {
proxy_pass http://api:8000/api/;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
}
@@ -16,7 +17,6 @@ server {
location / {
proxy_pass http://frontend:80;
proxy_set_header Host $host;
proxy_set_header Host $http_host;
}
}