forked from dloeckx/esp-update-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx_example.conf
29 lines (25 loc) · 901 Bytes
/
nginx_example.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
# Note: It is important to add:
# `underscores_in_headers on; # allow underscores_in_headers to be parsed and passed on`
# to the global nginx.conf , otherwise the MAC-address will not be received by the OTA-server
server {
listen 5001;
server_name fwupdate.test.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:5000;
}
location /update {
proxy_pass http://127.0.0.1:5000/update;
proxy_buffering on;
proxy_buffers 12 12k;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto http;
proxy_pass_request_headers on;
}
}