From 2ff5218f562487d37eb6168f17c3e3990af71efa Mon Sep 17 00:00:00 2001
From: Jens Giessmann <j.giessmann@herzogkommunikation.de>
Date: Wed, 12 Dec 2018 12:52:19 +0100
Subject: [PATCH] docs for the X-Forwarded-Proto or $scheme behavior, #11

---
 README.md          | 3 ++-
 docker-compose.yml | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 9a1985a..659836e 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,8 @@ A very simple container to redirect HTTP traffic to another server, based on `ng
 - `SERVER_REDIRECT_PATH` - optionally define path to redirect all requests eg. `/landingpage`
    - if not set nginx var `$request_uri` is used
 - `SERVER_REDIRECT_SCHEME` - optionally define scheme to redirect to 
-   - if not set nginx var `$scheme` is used
+   - if not set but X-Forwarded-Proto is send as request header with value 'https' this will be used. 
+     In all other cases nginx var `$scheme` is used
 - `SERVER_REDIRECT_CODE` - optionally define the http status code to use for redirection
    - if not set or not in list of allowed codes 301 is used as default
    - allowed Codes are: 301, 302, 303, 307, 308
diff --git a/docker-compose.yml b/docker-compose.yml
index ff5ac86..9ccc112 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -8,7 +8,8 @@ to:
     # if not set nginx var $request_uri is used
     #- SERVER_REDIRECT_PATH=/landingpage
     # optionally define schema to redirect all requests
-    # if not set nginx var $scheme is used
+    # if not set but X-Forwarded-Proto is send as request header with value 'https' this will be used.
+    # In all other cases nginx var `$scheme` is used
     #- SERVER_REDIRECT_SCHEME=https
     # optionally define the http code to use for redirection
     # allowed Codes are: 301, 302, 303, 307, 308, default is 301
-- 
GitLab