docs(supabase): trial comments and guide state the refusals exactly
This commit is contained in:
1 parent
fe724b263e
commit
9e68bdd1fa
3 files changed
+10
-9
No files matched your search
@@ -5,7 +5,8 @@ import base from '../vite.config'
|
||||
/**
|
||||
* Dev server of `pnpm db:sandbox trial` (docs/development/V1-2-6_OWNER_TRIAL.md).
|
||||
* The browser talks to this origin only: the three Supabase routes are
|
||||
* forwarded to the trial gateway on loopback, so no CORS rule is involved.
|
||||
* forwarded to the trial gateway on loopback, so the app itself needs no CORS (the proxied
|
||||
* routes keep the stack's own CORS headers).
|
||||
* The server binds the one host that scripts/db-sandbox.sh validated (loopback or a private
|
||||
* address of this machine) and refuses any other Host header.
|
||||
*/
|
||||
@@ -28,8 +29,8 @@ const SUPABASE_ROUTES = ['/auth/v1', '/rest/v1', '/storage/v1']
|
||||
const REPO = fileURLToPath(new URL('../../../', import.meta.url))
|
||||
|
||||
/**
|
||||
* `allowedHosts` still lets every IP literal and localhost through (Vite 7): any HTTP request
|
||||
* whose Host is not the trial host gets a 403, and the editor-launch route is closed to the LAN.
|
||||
* `allowedHosts` still lets every IP literal and localhost through (Vite 7): any HTTP request whose
|
||||
* Host is not the trial host is refused (403; the editor-launch route answers 404 to every Host).
|
||||
* The trial serves no WebSocket: the proxy's upgrade listener would hold such a socket open, so
|
||||
* every upgrade is closed at once.
|
||||
*/
|
||||
@@ -59,8 +60,8 @@ export default defineConfig((env) =>
|
||||
host,
|
||||
strictPort: true,
|
||||
allowedHosts: [host],
|
||||
// Same origin through the proxy: no CORS answer, and no hot-reload socket (its upgrade
|
||||
// skips the middlewares above) on a manual trial.
|
||||
// Same origin through the proxy: Vite adds no CORS header, and no hot-reload socket
|
||||
// (its upgrade skips the middlewares above) on a manual trial.
|
||||
cors: false,
|
||||
ws: false,
|
||||
// The LAN sees the app's own sources only: never the repository's notes, seed or builds.
|
||||
|
||||
Reference in new issue
Block a user