DockFlare/webmail/nginx.conf

29 lines
No EOL
982 B
Nginx Configuration File

server {
listen 80;
server_name _;
client_max_body_size 25m;
add_header Content-Security-Policy "connect-src *; default-src 'self'; img-src 'self' data: https: blob:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' https://static.cloudflareinsights.com; font-src 'self' data: https://r2cdn.perplexity.ai https://rsms.me;" always;
location /api/ {
proxy_pass http://dockflare-mail-manager:8025/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location = /config.json {
root /usr/share/nginx/html;
add_header Cache-Control "no-store";
}
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri $uri/ /index.html;
}
location ~* \.(?:ico|css|js|gif|jpe?g|png|woff2?|eot|ttf|svg|mp4|webm)$ {
root /usr/share/nginx/html;
expires 1y;
add_header Cache-Control "public, immutable";
}
}