diff --git a/app.json b/app.json index 7262565..ec22e26 100644 --- a/app.json +++ b/app.json @@ -11,6 +11,11 @@ "description": "Путь перенаправления", "value": "https://aviasales.ru/?marker=18479", "required": true + }, + "HEADER_HOST": { + "description": "Заголовок Host", + "value": "aviasales.ru", + "required": true } }, "buildpacks": [ diff --git a/config/nginx.conf.erb b/config/nginx.conf.erb index d436d3c..d2e824b 100644 --- a/config/nginx.conf.erb +++ b/config/nginx.conf.erb @@ -37,7 +37,7 @@ http { location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; + proxy_set_header Host <%= ENV['HEADER_HOST'] || 'aviasales.ru' %>; proxy_redirect off; proxy_pass <%= ENV['PROXY_PASS'] || 'https://aviasales.ru/?marker=18479' %>; }