chore: add security headers to next.config.js - #266
Merged
Conversation
Adds X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and X-Frame-Options across all routes. geolocation stays enabled for this origin (the 'Near me' feature genuinely uses it); camera/microphone are disabled since nothing here uses them. A full CSP is a bigger, separate effort (MapTiler, Supabase, Vercel Analytics, Leaflet/OG pipelines) and is left for a follow-up, as the issue itself scopes it. Note on verification: couldn't run 'npm run build' + curl -I in this environment - the build fails on fetching Google Fonts regardless of this change (confirmed identically on unmodified main, unrelated network restriction in this sandbox). Verified the headers() function directly instead (node -e requiring next.config.js and awaiting headers()) - returns exactly the four rules above. Worth a real curl -I check against a local next start before merging. Fixes StudentSuite#254
Contributor
|
@propcgamer20-png is attempting to deploy a commit to the studentsuite Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds X-Content-Type-Options, Referrer-Policy, Permissions-Policy, and X-Frame-Options across all routes. geolocation stays enabled for this origin (the 'Near me' feature genuinely uses it); camera/microphone are disabled since nothing here uses them. A full CSP is a bigger, separate effort (MapTiler, Supabase, Vercel Analytics, Leaflet/OG pipelines) and is left for a follow-up, as the issue itself scopes it.
Note on verification: couldn't run 'npm run build' + curl -I in this environment - the build fails on fetching Google Fonts regardless of this change (confirmed identically on unmodified main, unrelated network restriction in this sandbox). Verified the headers() function directly instead (node -e requiring next.config.js and awaiting headers()) - returns exactly the four rules above. Worth a real curl -I check against a local next start before merging.
Fixes #254
What this changes
Type of change
Proof (required for new public places)
Fill this in for every place added in this PR. It stays in the PR, not in the
dataset.
gmaps_linkandadded_by(no proof fields committed).Checklist