-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnginx.conf
More file actions
37 lines (33 loc) · 1.1 KB
/
Copy pathnginx.conf
File metadata and controls
37 lines (33 loc) · 1.1 KB
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
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Disable caching for HTML files
location ~* \.html$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
try_files $uri $uri/ /index.html;
}
# Serve dashboard files
location / {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
try_files $uri $uri/ /index.html;
}
# Proxy aircraft database requests to tar1090 (avoids CORS)
location /aircraft-db/ {
proxy_pass http://ultrafeeder:80/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# Proxy tar1090 data endpoints (avoids CORS for map)
location /tar1090-data/ {
proxy_pass http://ultrafeeder:80/data/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_hide_header Access-Control-Allow-Origin;
add_header Access-Control-Allow-Origin *;
}
}