Skip to content

Commit 9856f70

Browse files
committed
fix: resolve issues with isPackPost regex that required github-style org/repo.git paths
1 parent 536cf9b commit 9856f70

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/proxy/routes/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ const proxyErrorHandler: ProxyOptions['proxyErrorHandler'] = (err, res, next) =>
137137

138138
const isPackPost = (req: Request) =>
139139
req.method === 'POST' &&
140-
// eslint-disable-next-line no-useless-escape
141-
/^\/[^\/]+\/[^\/]+\.git\/(?:git-upload-pack|git-receive-pack)$/.test(req.url);
140+
/^(?:\/[^/]+)*\/[^/]+\.git\/(?:git-upload-pack|git-receive-pack)$/.test(req.url);
142141

143142
const teeAndValidate = async (req: Request, res: Response, next: NextFunction) => {
144143
if (!isPackPost(req)) return next();

0 commit comments

Comments
 (0)