mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
12 lines
273 B
JavaScript
12 lines
273 B
JavaScript
function crateContextPathMiddleware(contextPath) {
|
|
return function(req, resp, next) {
|
|
const url = req.url;
|
|
if (url.indexOf(contextPath) === 0) {
|
|
req.url = url.substr(contextPath.length);
|
|
}
|
|
next();
|
|
}
|
|
}
|
|
|
|
module.exports = crateContextPathMiddleware;
|