Skip to content

Commit

Permalink
Merge pull request #11 from sukobuto/master
Browse files Browse the repository at this point in the history
Fix to see X-Forwarded-Proto for redirect scheme
  • Loading branch information
handcode authored Dec 12, 2018
2 parents 0c88dad + 3487557 commit 3452fdc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions default.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
map $http_x_forwarded_proto $redirect_scheme {
default $scheme;
https https;
}

server {
listen 80;
server_name ${SERVER_NAME};
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ fi

# set redirect scheme from optional ENV var
if [ ! -n "$SERVER_REDIRECT_SCHEME" ] ; then
SERVER_REDIRECT_SCHEME='$scheme'
SERVER_REDIRECT_SCHEME='$redirect_scheme'
fi

# set access log location from optional ENV var
Expand Down

0 comments on commit 3452fdc

Please sign in to comment.