chore: add Netlify deployment configuration
- netlify.toml: Configure cargo build --release and run compiler. Publish directory set to public/. - static/_headers: Add security headers (X-Frame-Options, CSP, etc.) and cache control for static assets (1 year for css/images, 1 hour for HTML, 1 hour for feed).
This commit is contained in:
25
static/_headers
Normal file
25
static/_headers
Normal file
@@ -0,0 +1,25 @@
|
||||
# Netlify headers for nrd.sh
|
||||
|
||||
# Default headers for all paths
|
||||
/*
|
||||
X-Frame-Options: DENY
|
||||
X-Content-Type-Options: nosniff
|
||||
Referrer-Policy: strict-origin-when-cross-origin
|
||||
|
||||
# Cache static assets aggressively
|
||||
/*.css
|
||||
Cache-Control: public, max-age=31536000, immutable
|
||||
|
||||
/*.png
|
||||
Cache-Control: public, max-age=31536000, immutable
|
||||
|
||||
/*.gif
|
||||
Cache-Control: public, max-age=31536000, immutable
|
||||
|
||||
# HTML pages: short cache, revalidate
|
||||
/*.html
|
||||
Cache-Control: public, max-age=3600, must-revalidate
|
||||
|
||||
# Feed: moderate cache
|
||||
/feed.xml
|
||||
Cache-Control: public, max-age=3600
|
||||
Reference in New Issue
Block a user