Skip to content

Commit

Permalink
Добавил параметров
Browse files Browse the repository at this point in the history
  • Loading branch information
best-tech committed Dec 10, 2020
1 parent 2daecf0 commit 745083c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
"value": "https://aviasales.ru/?marker=18479",
"required": true
},
"AUTH_HAEDER": {
"description": "Заголовок авторизации, например: Basic dGVzdHN0cmluZw==",
"value": "",
"required": false
},
"URL_PATH": {
"description": "Путь URL",
"value": "",
"required": false
},
"HEADER_HOST": {
"description": "Заголовок Host",
"value": "aviasales.ru",
Expand Down
4 changes: 3 additions & 1 deletion config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ http {
server_name _;
keepalive_timeout 5;

location / {
location /<%= ENV['URL_PATH'] || 'aviasales.ru' %> {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host <%= ENV['HEADER_HOST'] || 'aviasales.ru' %>;
proxy_redirect off;
proxy_pass <%= ENV['PROXY_PASS'] || 'https://aviasales.ru/?marker=18479' %>;
proxy_set_header Authorization "<%= ENV['AUTH_HAEDER'] %>";
}
}
}

0 comments on commit 745083c

Please sign in to comment.