The registration language is read today (preferences.language, the mail language); the Modal and the players order against popovers through layerStack, not the FloatingTree; the upload's auth dependency is current_user; the module of access tests covers onboarding and access, not only the canonical email. The dev proxy's WebSocket upgrade served the removed messages socket and goes; the test compose header says a pure-logic run needs SIFTLODE_TEST_REQUIRE_DB=0; the speed measure no longer reports an unreachable database as "no share link".
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import { reactWithCompiler } from "./reactPlugin";
|
|
import { devOnlyGuard } from "./devOnlyGuard";
|
|
|
|
// During `vite dev` (host with Node), proxy API calls to the backend container.
|
|
// Use 127.0.0.1 (not "localhost") so Node doesn't resolve to IPv6 ::1, which the
|
|
// Docker port publish may not answer — that surfaces as proxy connection failures.
|
|
const target = "http://127.0.0.1:8080";
|
|
// changeOrigin:false keeps the original `Host: localhost:5173` header when proxying to the backend
|
|
// (the TCP target is still 127.0.0.1:8080 — changeOrigin only rewrites the header). The backend uses
|
|
// that header to send the OAuth redirect_uri back to :5173, so a Google login started on the Vite dev
|
|
// server returns to :5173 instead of the fixed :8080 callback. (Both are registered in the console.)
|
|
const proxyOpts = { target, changeOrigin: false };
|
|
const proxy = {
|
|
"/api": proxyOpts,
|
|
"/auth": proxyOpts,
|
|
"/healthz": proxyOpts,
|
|
};
|
|
|
|
export default defineConfig({
|
|
plugins: [reactWithCompiler(), devOnlyGuard()],
|
|
server: { port: 5173, proxy },
|
|
build: { outDir: "dist" },
|
|
});
|