Skip to content

Commit

Permalink
fix: catching the error from http-proxy-middleware
Browse files Browse the repository at this point in the history
Refs: #143
Signed-off-by: zjpersc <[email protected]>
  • Loading branch information
zjpersc committed Mar 23, 2023
1 parent 870f654 commit 7c5f429
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/gitlab-backend/src/service/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ export async function createRouter(
[`^/api/gitlab/${host}`]: apiUrl.pathname,
},
onProxyReq: (proxyReq) => {
proxyReq.removeHeader('Authorization');
try {
proxyReq.removeHeader("Authorization");
} catch (e) {
console.log((e as Error).message);
}
},
})
);
Expand Down

0 comments on commit 7c5f429

Please sign in to comment.