32 lines
665 B
Smarty
32 lines
665 B
Smarty
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen 127.0.0.1:3005;
|
|
server_name _;
|
|
server_tokens off;
|
|
root /usr/share/html;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_set_header Host $host;
|
|
proxy_socket_keepalive on;
|
|
client_max_body_size 100m;
|
|
|
|
set_real_ip_from 127.0.0.1;
|
|
real_ip_header X-Forwarded-For;
|
|
real_ip_recursive on;
|
|
|
|
# Inform endpoint
|
|
location ~ ^/(inform|dl/firmware-cached).* {
|
|
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
|
|
return 405;
|
|
}
|
|
proxy_pass http://localhost:8080;
|
|
}
|
|
}
|
|
|