From 17f412e4078b2e281f42853c5b433d0324a1f22d Mon Sep 17 00:00:00 2001 From: Nick Semenkovich Date: Tue, 5 Jul 2016 08:38:34 -0500 Subject: [PATCH] docs: working nginx auth_request example (#273) --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 509f4c8..57ac672 100644 --- a/README.md +++ b/README.md @@ -355,14 +355,18 @@ server { proxy_pass http://127.0.0.1:4180; } + location /oauth2/ { + proxy_pass http://127.0.0.1:4180; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + } + location / { auth_request /oauth2/auth; - error_page 401 = ...; + error_page 401 = https://example.com/oauth2/sign_in; root /path/to/the/site; - default_type text/html; - charset utf-8; - charset_types application/json utf-8; } } ```