mirror of https://github.com/istio/istio.io.git
Add override for redirects (#16526)
This commit is contained in:
parent
febc106d39
commit
8ac9f1524f
|
@ -2,6 +2,10 @@ export default async (request: Request, context) => {
|
|||
const url = new URL(request.url);
|
||||
let pathname = url.pathname;
|
||||
|
||||
if (url.searchParams.get('redirect') === 'false') {
|
||||
return context.next();
|
||||
}
|
||||
|
||||
// Normalize consecutive slashes
|
||||
pathname = pathname.replace(/\/\/+/g, '/');
|
||||
|
||||
|
|
Loading…
Reference in New Issue