chore(dev): allow tunnel host + all interfaces in Vite dev server
CI / changes (pull_request) Successful in 1s
CI / fast-checks (pull_request) Successful in 1m26s
CI / api (pull_request) Successful in 1m5s
CI / harness (pull_request) Successful in 4m16s
CI / security (pull_request) Successful in 39s
CI / gate (pull_request) Successful in 1s
CI / changes (pull_request) Successful in 1s
CI / fast-checks (pull_request) Successful in 1m26s
CI / api (pull_request) Successful in 1m5s
CI / harness (pull_request) Successful in 4m16s
CI / security (pull_request) Successful in 39s
CI / gate (pull_request) Successful in 1s
Reaching the dev PWA through the Pangolin/newt tunnel failed: Vite's default
host check 403s any non-localhost Host header ('Blocked request'), which the
tunnel health checks on / and /health read as unhealthy. Add allowedHosts:true
and host:true so the dev server accepts the tunnel hostname and listens on all
interfaces. Dev-only config; the production image serves the built PWA itself.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
a2ad5bdbd3
commit
cc875de0eb
@@ -44,6 +44,13 @@ export default defineConfig({
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
server: {
|
server: {
|
||||||
|
// Dev box reached through the Pangolin/newt tunnel: Vite's default host check
|
||||||
|
// 403s any non-localhost Host header ("Blocked request"), which the tunnel
|
||||||
|
// health check reads as unhealthy. `true` accepts any host (fine for a private
|
||||||
|
// throwaway dev tunnel); replace with e.g. ['familysync.example.com'] to scope it.
|
||||||
|
allowedHosts: true,
|
||||||
|
// Listen on all interfaces so newt can reach Vite via the box IP, not just localhost.
|
||||||
|
host: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
'/health': 'http://localhost:3000',
|
'/health': 'http://localhost:3000',
|
||||||
'/api': 'http://localhost:3000',
|
'/api': 'http://localhost:3000',
|
||||||
|
|||||||
Reference in New Issue
Block a user