From 79517fc6e0a89f0a18f4a12994473b9d5b26dcee Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 29 Nov 2017 19:15:44 +0100 Subject: [PATCH] Various Heroku related fixes. --- .env.heroku | 2 +- app.json | 5 ++++- nginx_app.conf | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.env.heroku b/.env.heroku index fbe8cf51de..0043f59a0b 100644 --- a/.env.heroku +++ b/.env.heroku @@ -5,7 +5,7 @@ APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2 APP_LOG=errorlog APP_LOG_LEVEL=debug APP_URL=http://localhost -TRUSTED_PROXIES= +TRUSTED_PROXIES=* DB_CONNECTION=pgsql diff --git a/app.json b/app.json index ceeddf8d98..4843baa8d6 100644 --- a/app.json +++ b/app.json @@ -39,7 +39,10 @@ ], "addons": [ { - "plan": "heroku-postgresql" + "plan": "heroku-postgresql", + "options": { + "version": "9.5" + } } ], "scripts": { diff --git a/nginx_app.conf b/nginx_app.conf index b0a4d0ee32..97bdb62378 100644 --- a/nginx_app.conf +++ b/nginx_app.conf @@ -1,7 +1,12 @@ +# prevent HTTPoxy vulnerability +fastcgi_param HTTP_PROXY ""; + location / { + # try to serve file directly, fallback to rewrite try_files $uri @rewriteapp; } location @rewriteapp { + # rewrite all to index.php rewrite ^(.*)$ /index.php$1 last; } \ No newline at end of file