Repository navigation
app/: the React app's pages (sc-8900) - #83
Closed
ndbroadbent wants to merge 2 commits into
Closed
ndbroadbent wants to merge 2 commits into
ndbroadbent wants to merge 2 commits into
Conversation
… as they are, and any other page path on the web group gets public/index.html (no-cache), so client-side routes load; a path naming a missing file, anything under /api/, and anything but GET or HEAD get a 404, as today
VisualCIdocspring/visualci · build #338 · 331 unchanged · no changes This PR vs base: nothing since #282, across 2 builds Updated as builds change. Agents can review with VisualCI's MCP tools. |
…dex.html come from the static file server), and /assets/ public, max-age=31536000, immutable; the fallback serves the page read at boot with the policy's hashes; only the app host serves the app's pages (any host when none are configured), so other hosts' unknown paths are a 404; the /api/ui 404 is tested as JSON
Member
Author
|
Included in #87. |
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.
Part of sc-8900. Stacked on #80, so the security policy's hashes and the page come from the same
public/index.html.Laravel already serves the files in
public/(the frontend's build goes there in the image) before routing. This adds the web group's fallback: any other page path getspublic/index.htmlwithcache-control: no-cache, so client-side routes such as/docspring/billingload.As today's
missing_files_are_not_found, these get a 404 instead of the page:/logo.png); crawlers would take the HTML for the file, and Cloudflare caches by extension;/api/;Tests: a unit test for telling file paths from pages, and an integration test covering a client route, a missing file, an API path and a POST. The whole app suite passes on docspring-dev, and clippy is clean.