fix: update Netlify configuration with proper headers and redirects

Co-Authored-By: G <butaeff@gmail.com>
This commit is contained in:
Devin AIandcato committed 2025-02-12 09:57:40 +00:00
1 parent 3b6371bd26
commit 5677b91c9c
1 file changed
+15
+15
View File
@@ -5,17 +5,32 @@
[build.environment]
NODE_VERSION = "18"
NEXT_TELEMETRY_DISABLED = "1"
[functions]
node_bundler = "esbuild"
included_files = ["app/api/**"]
external_node_modules = ["mongodb"]
[[redirects]]
from = "/*"
to = "/index.html"
status = 200
[[redirects]]
from = "/api/*"
to = "/.netlify/functions/api/:splat"
status = 200
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data:;"
[[headers]]
for = "/api/*"
[headers.values]