Skip to content

Commit f097237

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 f097237

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/bin/cli.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ 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: [
15+
{ source: '/**', destination: '/index.html' }
16+
]
17+
});
1318
});
1419

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

0 commit comments

Comments
 (0)