You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constconnection_id=req.headers['x-hyperdx-connection-id']!;// ! because zod already validated
@@ -101,10 +100,10 @@ function getConnection(): RequestHandler {
101
100
next(e);
102
101
}
103
102
};
104
-
}
105
103
106
-
functionproxyMiddleware(): RequestHandler{
107
-
returncreateProxyMiddleware({
104
+
constproxyMiddleware: RequestHandler=
105
+
// prettier-ignore-next-line
106
+
createProxyMiddleware({
108
107
target: '',// doesn't matter. it should be overridden by the router
109
108
changeOrigin: true,
110
109
pathFilter: (path,_req)=>{
@@ -122,11 +121,9 @@ function proxyMiddleware(): RequestHandler {
122
121
on: {
123
122
proxyReq: (proxyReq,_req)=>{
124
123
constnewPath=_req.params[0];
125
-
letqparams='';
126
-
constqIdx=_req.url.indexOf('?');
127
-
if(qIdx>=0){
128
-
qparams=_req.url.substring(qIdx);
129
-
}
124
+
// @ts-expect-error _req.query is type ParamQs, which doesn't play nicely with URLSearchParams. Replace with getting query params from _req.url eventually
0 commit comments