Skip to content

Commit 75d1baf

Browse files
committed
fix: update client proxy path rewrites for root and client paths
1 parent 1912b4b commit 75d1baf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/client-proxy.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createProxyMiddleware } from 'http-proxy-middleware';
22

33
const CLIENT_URL =
4-
process.env.CLIENT_URL || 'https://openwebhook.github.io/client/refs/tags/v1.0.8';
4+
process.env.CLIENT_URL || 'https://openwebhook.github.io/client';
55

66
const pathFilter = function (path: string, req: any) {
77
return (
@@ -21,6 +21,9 @@ export const clientProxy = createProxyMiddleware(pathFilter, {
2121
changeOrigin: true,
2222
followRedirects: true,
2323
pathRewrite: {
24-
'^(.(?!.*.css$|.*.js.map$|.*.svg$|.*.ico$|.*.js$|.*.html))*$': '',
24+
// For root path, rewrite to empty string to get the client index
25+
'^/$': '',
26+
// For paths starting with /client, remove the /client prefix since target already includes it
27+
'^/client': '',
2528
},
2629
});

0 commit comments

Comments
 (0)