-
Notifications
You must be signed in to change notification settings - Fork 11
/
proxy.conf.mustache
88 lines (78 loc) · 2.78 KB
/
proxy.conf.mustache
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
server {
{{#PORT_NOTEBOOK}}
listen {{PORT_NOTEBOOK}};
{{/PORT_NOTEBOOK}}
{{^PORT_NOTEBOOK}}
listen 8080;
{{/PORT_NOTEBOOK}}
server_name default_server;
{{#MARATHON_APP_ID}}
port_in_redirect off;
{{/MARATHON_APP_ID}}
{{^MARATHON_APP_ID}}
port_in_redirect on;
{{/MARATHON_APP_ID}}
rewrite_log on;
#error_log logs/error.log warn;
#error_log /dev/stderr warn;
#large_client_header_buffers 4 16k;
#client_header_buffer_size 64k;
#set_by_lua $session_secret 'return os.getenv("OIDC_SESSION_SECRET")';
#set_by_lua $session_check_ssi 'return os.getenv("OIDC_SESSION_CHECK_SSI")';
#set_by_lua $session_name 'return os.getenv("OIDC_SESSION_NAME")';
location = /favicon.ico {
return 404;
}
location = /healthz {
return 200;
}
location {{MARATHON_APP_LABEL_HAPROXY_0_PATH}}/ {
access_by_lua_file lua/oidc_auth_proxy_pass.lua;
client_max_body_size 2048m;
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
location ^~ {{MARATHON_APP_LABEL_HAPROXY_0_PATH}}/daskboard/ {
access_by_lua_file lua/oidc_auth_proxy_pass.lua;
{{#PORT_DASKBOARD}}
proxy_pass http://{{MESOS_CONTAINER_IP}}:{{PORT_DASKBOARD}};
{{/PORT_DASKBOARD}}
{{^PORT_DASKBOARD}}
proxy_pass http://{{MESOS_CONTAINER_IP}}:8787;
{{/PORT_DASKBOARD}}
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
location ^~ {{MARATHON_APP_LABEL_HAPROXY_0_PATH}}/tensorboard/ {
access_by_lua_file lua/oidc_auth_proxy_pass.lua;
proxy_pass http://127.0.0.1:6006;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_http_version 1.1;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 86400;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}