forked from jcu-eresearch/nginx-custom-build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
48 lines (41 loc) · 1.13 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
worker_processes 1;
daemon off;
master_process off;
error_log stderr debug;
events {
worker_connections 1024;
}
http {
server {
listen 80 default_server;
# 401 must be returned
location /test1 {
shib_request /noauth;
}
# 301 must be returned
location /test2 {
shib_request /noauth-redir;
}
# 404 must be returned; a 200 here is incorrect
# Check the console output from ``nginx.debug`` ensure lines
# stating ``shib request authorizer copied header:`` are present.
location /test3 {
shib_request /auth;
}
# Mock backend authentication endpoints, simulating shibauthorizer
location /noauth {
internal;
return 401 'Not authenticated';
}
location /noauth-redir {
internal;
return 301 http://davidjb.com;
}
location /auth {
internal;
more_set_headers "Variable-Email: [email protected]";
more_set_headers "Variable-Cn: davidjb";
return 200 'Authenticated';
}
}
}