Repository navigation
app/: routing by hostname, hardened (sc-8900) - #63
Merged
Merged
Conversation
VisualCIdocspring/visualci · build #309 · 331 unchanged · no changes This PR vs base: nothing since #223, across 7 builds Updated as builds change. Agents can review with VisualCI's MCP tools. |
ndbroadbent
force-pushed
the
laravel-hosts-hardening
branch
from
December 2, 2026 14:00
5a86b75 to
28cfb96
Compare
ndbroadbent
force-pushed
the
laravel-hosts-hardening
branch
2 times, most recently
from
December 2, 2026 15:22
b94c220 to
10fe553
Compare
…fuses to boot without all four host URLs; the host check judges a normalised path (percent-decoded, repeated slashes collapsed, lowercased), so /%61pi/v1, //api/v1 and /API/v1 can't reach the API through the app host; tests
…r host URLs name a host and no two are the same (a bare app.visualci.com fails); in production a request for any other host reaches only /up and the renderers' /internal paths; Laravel's TrustHosts trusts every host, since it would refuse the API and MCP hosts and the pods' probes and route_by_host is the host check; tested in production for an unknown host and a boot that fails
…e in production (sign-in's callback, OAuth metadata, the device code and redirects are unreachable from it; every other URL comes from the configured host URLs)
… (one host serves everything, as a self-hosted VisualCI does, every URL from APP_URL) or all four, each naming a host and no two the same; only some of them is a boot error; tested in production for one host, the partial case, and four
…uth settings; one Cargo.toml tracing entry; the OAuth discovery test expects the tests' APP_URL (https://app.visualci.test, since #59)
ndbroadbent
force-pushed
the
laravel-hosts-hardening
branch
from
December 2, 2026 15:42
10fe553 to
4dbdbb2
Compare
ndbroadbent
added a commit
that referenced
this pull request
Dec 2, 2026
…SSUER and OAUTH_AUTHORIZATION_ENDPOINT matching), as app/'s boot checks require (#63)
2 of 10 tasks
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.
The coordinator's follow-ups from reviewing #53:
bootedhook refuses to start whenAPP_ENVis production and any ofVISUALCI_SITE_URL,VISUALCI_APP_URL,VISUALCI_API_URLorVISUALCI_MCP_URLis missing, naming the missing ones. Development and tests still serve every path when they aren't set./internalmust check the renderer token whatever the Host) belongs to the renderer API on visualci features' side. I've passed it to them, including the test for an unknown Host with no token./%61pi/v1/builds,//api/v1/builds,/API/v1and/%2Fapi/v1all count as/api/v1. They can't reach an API handler through the app host, whatever the router does with them.Tests: unit tests for normalisation, for each odd path on both hosts and for the production check, plus an integration test showing the odd paths get a 404 on the app host.