website/docs: improve nginx examples (#3372)

* website/docs: improve nginx examples

Signed-off-by: itsmesid <693151+arevindh@users.noreply.github.com>

* website/docs: improve nginx examples

Signed-off-by: itsmesid <693151+arevindh@users.noreply.github.com>
This commit is contained in:
itsmesid 2022-08-31 00:49:25 +05:30 committed by GitHub
parent abca435337
commit 19c36d20b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -20,6 +20,10 @@ location / {
auth_request_set $auth_cookie $upstream_http_set_cookie;
add_header Set-Cookie $auth_cookie;
# pass original hostname and url to Nginx Proxy Manager, it might be needed for some apps to work
# proxy_set_header Host $host;
# proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
# translate headers from the outposts back to the actual upstream
auth_request_set $authentik_username $upstream_http_x_authentik_username;
auth_request_set $authentik_groups $upstream_http_x_authentik_groups;

View file

@ -23,6 +23,10 @@ server {
auth_request_set $auth_cookie $upstream_http_set_cookie;
add_header Set-Cookie $auth_cookie;
# pass original hostname and url to Nginx, it might be needed for some apps to work
# proxy_set_header Host $host;
# proxy_set_header X-Original-URL $scheme://$http_host$request_uri;
# translate headers from the outposts back to the actual upstream
auth_request_set $authentik_username $upstream_http_x_authentik_username;
auth_request_set $authentik_groups $upstream_http_x_authentik_groups;