heissepreise/docker/server.conf
2023-08-04 14:16:28 +02:00

42 lines
1.6 KiB
Plaintext

server {
listen 80;
index index.html;
server_name www.heisse-preise.io heisse-preise.at;
error_log /logs/error.log;
access_log /logs/access.log;
root /heisse-preise/site/output;
# Let the nginx-proxy give us the
# real ip, see https://github.com/jwilder/nginx-proxy/issues/130
real_ip_header X-Forwarded-For;
real_ip_recursive on;
set_real_ip_from 0.0.0.0/0;
location / {
try_files $uri $uri/ =404;
http2_push /styles.css;
http2_push /utils.js;
http2_push /latest-caninical.billa.compressed.json;
http2_push /latest-caninical.dm.compressed.json;
http2_push /latest-caninical.hofer.compressed.json;
http2_push /latest-caninical.lidl.compressed.json;
http2_push /latest-caninical.mpreis.compressed.json;
http2_push /latest-caninical.spar.compressed.json;
http2_push /latest-caninical.unimarkt.compressed.json;
http2_push /alasql.js;
http2_push /chart.js;
http2_push /main.js;
etag on;
# Enable CORS for all files
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type';
add_header 'Access-Control-Allow-Credentials' 'true' always;
}
error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 414 415 416 417 418 421 422 423 424 425 426 428 429 431 451 500 501 502 503 504 505 506 507 508 510 511 /404;
location = /404 {
try_files /404.html $uri;
}
}