-
Notifications
You must be signed in to change notification settings - Fork 17
/
proxy.conf
29 lines (24 loc) · 1004 Bytes
/
proxy.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
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
rewrite ^PROXY_PREFIX/rstudio$ $scheme://$host/PROXY_PREFIX/rstudio/ permanent;
location PROXY_PREFIX/rstudio/ {
rewrite ^PROXY_PREFIX/rstudio/(.*)$ /$1 break;
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/PROXY_PREFIX/rstudio/;
proxy_http_version 1.1;
proxy_hide_header x-frame-options;
proxy_set_header Host $host:$server_port;
proxy_set_header Origin $scheme://$host:$server_port;
proxy_set_header Connection $http_connection;
proxy_set_header Cookie $http_cookie;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}