-
Notifications
You must be signed in to change notification settings - Fork 142
/
Copy pathnginx.conf
45 lines (39 loc) · 1.47 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
js_include conf.d/nginx.js;
js_set $authorization authorization;
charset UTF-8;
server {
listen 8080;
server_name localhost;
absolute_redirect off;
gzip on;
root /usr/share/nginx/html/;
location /master/ {
proxy_pass https://kubernetes.default/;
rewrite /master/(.*) /$1 break;
proxy_pass_request_headers on;
proxy_pass_request_body on;
proxy_ssl_trusted_certificate /var/run/secrets/kubernetes.io/serviceaccount/ca.crt;
proxy_ssl_verify on;
proxy_ssl_session_reuse on;
proxy_set_header Authorization $authorization;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_read_timeout 3600;
}
location = /master/oauth/authorize {
proxy_pass https://kubernetes.default/;
rewrite /master/(.*) /$1 break;
proxy_pass_request_headers on;
proxy_hide_header WWW-Authenticate;
proxy_intercept_errors on;
error_page 302 = @oauth_redirect;
}
location @oauth_redirect {
add_header Location $upstream_http_location always;
return 200;
}
location = /server {
return 204;
}
}