mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: remove consecutive slashes
A small middleware who will rewrite potential dual slashes to a single slash.
This commit is contained in:
		
							parent
							
								
									ea9311d892
								
							
						
					
					
						commit
						92e14c4485
					
				@ -64,6 +64,11 @@ 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(
 | 
			
		||||
        `${baseUriPath}/api/admin/features-batch`,
 | 
			
		||||
        express.json({ strict: false, limit: '500kB' }),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user