2021-06-07 00:37:54 +00:00
|
|
|
listen 443 default_server;
|
|
|
|
location / {
|
|
|
|
set $redirect 0;
|
|
|
|
if ($server_port != 443) {
|
|
|
|
set $redirect 1;
|
|
|
|
}
|
|
|
|
if ($http_user_agent ~* "ELB-HealthChecker") {
|
|
|
|
set $redirect 0;
|
|
|
|
}
|
|
|
|
if ($redirect = 1) {
|
|
|
|
return 301 https://$host$request_uri;
|
|
|
|
}
|
|
|
|
|
2022-07-12 18:18:12 +00:00
|
|
|
add_header Onion-Location http://snsnsnya6h3ot563f3p566wuhfoklkg5f62hokdlaqzcaub3gf4xlxyd.onion$request_uri;
|
|
|
|
|
2021-06-07 00:37:54 +00:00
|
|
|
proxy_pass http://127.0.0.1:8080;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
|
|
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
}
|