Skip to content

Commit 4201b31

Browse files
Fix OAuth callback route in production builds
Add SPA routing configuration to serve-handler to ensure /oauth/callback routes are correctly handled in production builds.
1 parent 2788097 commit 4201b31

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/bin/cli.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
99
const distPath = join(__dirname, "../dist");
1010

1111
const server = http.createServer((request, response) => {
12-
return handler(request, response, { public: distPath });
12+
return handler(request, response, {
13+
public: distPath,
14+
rewrites: [{ source: "/**", destination: "/index.html" }],
15+
});
1316
});
1417

1518
const port = process.env.PORT || 5173;

0 commit comments

Comments
 (0)