Retro Bulletin Board Systems on atproto. Web app and TUI.
lazy mirror of alyraffauf/atbbs
atbbs.xyz
forums
python
tui
atproto
bbs
1server {
2 listen 80;
3 root /usr/share/nginx/html;
4 index index.html;
5
6 # SPA fallback — serve index.html for all routes that don't match a file.
7 # no-cache ensures the browser revalidates on every visit so users never
8 # see stale HTML after OAuth redirects or deploys.
9 location / {
10 add_header Cache-Control "no-cache" always;
11 try_files $uri $uri/ /index.html;
12 }
13
14 # Hashed assets from Vite never change — cache them aggressively.
15 location /assets/ {
16 add_header Cache-Control "public, max-age=31536000, immutable";
17 }
18
19 # Runtime config generated by the entrypoint — don't cache.
20 location = /config.json {
21 add_header Cache-Control "no-cache";
22 }
23
24 # OAuth client metadata must be fetchable cross-origin by auth servers.
25 location = /client-metadata.json {
26 add_header Access-Control-Allow-Origin *;
27 add_header Cache-Control "public, max-age=300";
28 }
29
30 # Security headers (mirrors public/_headers for Cloudflare Pages).
31 add_header X-Frame-Options DENY;
32 add_header X-Content-Type-Options nosniff;
33 add_header Referrer-Policy strict-origin-when-cross-origin;
34 add_header Content-Security-Policy "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https:; connect-src 'self' https:; frame-ancestors 'none'; base-uri 'self'; form-action 'self'";
35}