-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
34 lines (29 loc) · 833 Bytes
/
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
events {}
http {
upstream geoblock {
server geoblock:8080;
}
map $host $backend {
whoami-1.local whoami-1:80;
whoami-2.local whoami-2:80;
}
server {
listen 80;
server_name whoami-1.local whoami-2.local;
resolver 127.0.0.11;
location / {
proxy_pass http://$backend;
proxy_set_header Host $host;
auth_request /auth;
}
location /auth {
internal;
proxy_pass http://geoblock/v1/forward-auth;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Method $request_method;
}
}
}