Skip to content

Commit

Permalink
Описание
Browse files Browse the repository at this point in the history
  • Loading branch information
best-tech committed Apr 15, 2020
1 parent 1c64ac0 commit 0beebd5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# heroku proxy pass

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/best-tech/heroku-proxy-pass)
1. log in to heroku

2. [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/best-tech/heroku-proxy-pass)

or

```
git clone https://github.com/best-tech/heroku-proxy-pass.git
cd heroku-proxy-pass
heroku create
heroku buildpacks:add heroku-community/nginx
heroku config:set PROXY_PASS="https://aviasales.ru/?marker=18479"
git push heroku master
```
6 changes: 1 addition & 5 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
{
"name": "Heroku http proxy-pass",
"description": "Прокси",
"description": "proxy https => https",
"keywords": [
"proxy"
],
"website": "https://github.com/best-tech/heroku-proxy-pass",
"repository": "https://github.com/best-tech/heroku-proxy-pass",
"scripts": {
"postdeploy": "bundle exec rake bootstrap"
},
"env": {
"PROXY_PASS": {
"description": "Путь перенаправления",
"value": "https://aviasales.ru/?marker=18479",
"required": true
}
},

"buildpacks": [
{
"url": "https://github.com/heroku/heroku-buildpack-nginx"
Expand Down
2 changes: 1 addition & 1 deletion config/nginx.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass <%= ENV['PROXY_PASS'] || 'http://ya.ru' %>;
proxy_pass <%= ENV['PROXY_PASS'] || 'https://aviasales.ru/?marker=18479' %>;
}
}
}

0 comments on commit 0beebd5

Please sign in to comment.