1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-27 13:49:10 +02:00

fix: remove consecutive slashes

A small middleware who will rewrite potential dual slashes to a single slash.
This commit is contained in:
Ivar Conradi Østhus 2023-06-06 12:21:23 +02:00
parent 3e342269a8
commit c3351dd394
No known key found for this signature in database
GPG Key ID: 14F51E4841AF1DE1

View File

@ -62,6 +62,10 @@ export default async function getApp(
app.use(compression());
app.use(cookieParser());
app.use((req, res, next) => {
req.url = req.url.replace(/\/+/g, '/');
next();
});
app.use(express.json({ strict: false }));
if (unleashSession) {
app.use(unleashSession);