mirror of
https://github.com/DeNNiiInc/Website-Stress-Test.git
synced 2026-04-17 12:36:00 +00:00
Fix Nginx double slash issue in proxy server
This commit is contained in:
@@ -68,7 +68,8 @@ const server = http.createServer((req, res) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Handle Git Info request
|
// Handle Git Info request
|
||||||
if (req.url === '/git-info' && req.method === 'GET') {
|
// Nginx proxy_pass might result in double slashes (//git-info)
|
||||||
|
if ((req.url === '/git-info' || req.url === '//git-info') && req.method === 'GET') {
|
||||||
handleCORS(res);
|
handleCORS(res);
|
||||||
getGitInfo().then(info => {
|
getGitInfo().then(info => {
|
||||||
res.writeHead(200, { 'Content-Type': 'application/json' });
|
res.writeHead(200, { 'Content-Type': 'application/json' });
|
||||||
|
|||||||
Reference in New Issue
Block a user