GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — website/nginx.conf at main · cubeos-app/website

Expand file tree

/

nginx.conf

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
122 lines (103 loc) · 4.36 KB
/

nginx.conf

Copy path

File metadata and controls

122 lines (103 loc) · 4.36 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /tmp/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Temp paths for unprivileged Chainguard nginx
client_body_temp_path /tmp/client_temp;
proxy_temp_path /tmp/proxy_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
# Security
server_tokens off;
# Logging
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
# Performance
sendfile on;
tcp_nopush on;
keepalive_timeout 65;
gzip off;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
# Shared CSP value — Umami analytics + Google Fonts only
map $uri $csp_value {
default "default-src 'self'; script-src 'self' 'unsafe-inline' https://analytics.cubeos.app; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; img-src 'self' data: https:; font-src 'self' data: https://fonts.gstatic.com; connect-src 'self' https://analytics.cubeos.app; frame-src 'none'; frame-ancestors 'self'; base-uri 'self'; form-action 'self';";
}
server {
listen 8443 ssl http2;
server_name _;
root /usr/share/nginx/html;
index index.html;
# TLS config
ssl_certificate /etc/nginx/certs/tls.crt;
ssl_certificate_key /etc/nginx/certs/tls.key;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 1d;
ssl_session_tickets off;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), usb=(), magnetometer=(), gyroscope=(), accelerometer=()" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header Content-Security-Policy $csp_value always;
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
# Custom 404 page
error_page 404 /404.html;
# Health check
location /healthz {
access_log off;
return 200 "OK\n";
add_header Content-Type text/plain;
}
# Content negotiation — curl/wget get install script, browsers get website
location = / {
if ($http_user_agent ~* "^(curl|Wget|wget|HTTPie|PowerShell)") {
rewrite ^ /install.sh last;
}
try_files $uri $uri/ /index.html;
}
# Install script — served as plain text with short cache
location = /install.sh {
default_type text/plain;
add_header Cache-Control "public, max-age=300";
add_header X-Content-Type-Options "nosniff" always;
}
# Channel metadata — JSON with short cache
location /channels/ {
add_header Cache-Control "public, max-age=300";
add_header Access-Control-Allow-Origin "*" always;
add_header X-Content-Type-Options "nosniff" always;
}
# Static files
location / {
try_files $uri $uri/ =404;
}
# Allow .well-known directory
location ^~ /.well-known/ {
allow all;
}
# Cache static assets — 1 year for immutable hashed assets
location ~* \.(css|js|png|jpg|jpeg|gif|ico|svg|woff|woff2|webp)$ {
expires 1y;
add_header Cache-Control "public, immutable";
add_header X-Content-Type-Options "nosniff" always;
}
# Deny hidden files
location ~ /\. {
deny all;
}
}
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.