Chore: add deploy configuration for static hosting - #1
Merged
Merged
Conversation
Security and cache headers for the built site, and a pinned Node version so a host resolves the same toolchain the build expects. Headers were verified against the production build served with them applied: same-origin widget iframes still render and the console stays clean.
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.
Summary
Adds
public/_headerswith security and cache headers for the built site, and.node-versionpinning 22.12.0 so a host resolves the toolchain the buildexpects.
Headers set:
X-Content-Type-Options,Referrer-Policy,X-Frame-Options: SAMEORIGIN, a restrictivePermissions-Policy, and HSTS. Long immutable cachefor
/img/*and/icons/*.SAMEORIGINrather thanDENY, because the widget previews are same-originiframes and
DENYblocks those too.Testing
npm run buildandnpm run checkboth pass. The production build was servedwith these headers applied and loaded in Chrome: all five widget iframes render
on the landing page and the Now Playing page, and the console is clean.
Checklist
npm run buildandnpm run checkboth pass.