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
41load_module modules/ngx_http_proxy_connect_module.so;
events {
worker_connections 1024;
}
http {
proxy_max_temp_file_size 0;
map $http_upgrade $proxy_connection {
default upgrade;
"" close;
}
upstream a11yproxy-pool {
least_conn;
server a11yproxy:8888;
}
server {
listen 8888;
# Enable proxy support for CONNECT requests within the location block
location / {
proxy_connect;
proxy_connect_allow 443 563;
proxy_connect_connect_timeout 10s;
proxy_connect_data_timeout 10s;
proxy_pass http://$host;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection $proxy_connection;
proxy_connect_timeout 3600;
}
}
}