From 7d6cf3bbec9b7a844ea41f356b3feb33c8bd2d2b Mon Sep 17 00:00:00 2001 From: BlackDex Date: Wed, 27 Feb 2019 13:37:42 +0100 Subject: [PATCH] Updated Proxy examples (markdown) --- Proxy-examples.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Proxy-examples.md b/Proxy-examples.md index 3b28017..f716baa 100644 --- a/Proxy-examples.md +++ b/Proxy-examples.md @@ -57,6 +57,22 @@ server { location /notifications/hub/negotiate { proxy_pass http://:80; } + + # Optionally add extra authentication besides the AUTH_TOKEN + # If you don't want this, leave this part out + location /admin { + # See: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ + auth_basic "Private"; + auth_basic_user_file /path/to/htpasswd_file; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_pass http://:80; + } + } ```