Skip to content

Commit 17f412e

Browse files
semenkojehiah
authored andcommitted
docs: working nginx auth_request example (bitly#273)
1 parent da0bb76 commit 17f412e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,14 +355,18 @@ server {
355355
proxy_pass http://127.0.0.1:4180;
356356
}
357357
358+
location /oauth2/ {
359+
proxy_pass http://127.0.0.1:4180;
360+
proxy_set_header Host $host;
361+
proxy_set_header X-Real-IP $remote_addr;
362+
proxy_set_header X-Scheme $scheme;
363+
}
364+
358365
location / {
359366
auth_request /oauth2/auth;
360-
error_page 401 = ...;
367+
error_page 401 = https://example.com/oauth2/sign_in;
361368
362369
root /path/to/the/site;
363-
default_type text/html;
364-
charset utf-8;
365-
charset_types application/json utf-8;
366370
}
367371
}
368372
```

0 commit comments

Comments
 (0)