mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-04-25 07:52:38 -05:00
49 lines
1.0 KiB
Plaintext
49 lines
1.0 KiB
Plaintext
server {
|
|
listen 80 default_server;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
charset utf-8;
|
|
charset_types application/json;
|
|
|
|
# Docker reverse proxy IP passthrough
|
|
set_real_ip_from 172.16.0.0/12;
|
|
real_ip_header X-Real-IP;
|
|
|
|
# Log to a file as well as the main (Docker stdout) log
|
|
access_log /var/log/nginx/access.log;
|
|
access_log /logs/access.log;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Force browsers to check for updated data
|
|
location /data/ {
|
|
add_header Cache-Control no-cache;
|
|
}
|
|
|
|
location ~ \.ics$ {
|
|
add_header Content-Type text/calendar;
|
|
}
|
|
|
|
# CORS (for modern ES module support and third-party integrations)
|
|
location /assets/ {
|
|
add_header Access-Control-Allow-Origin *;
|
|
}
|
|
|
|
# Block access to the file used for screenshots
|
|
location = /screenshots.html {
|
|
internal;
|
|
}
|
|
}
|
|
|
|
# Redirect www to non-www
|
|
server {
|
|
listen 80;
|
|
|
|
server_name www.splatoon2.ink;
|
|
return 301 $scheme://splatoon2.ink$request_uri;
|
|
}
|