feat(next): middleware redirect /lecoffre -> /lecoffre/ (308); fix deploy check to accept 200/301/308
Some checks failed
build-and-push-ext / build_push (push) Failing after 23s
Some checks failed
build-and-push-ext / build_push (push) Failing after 23s
This commit is contained in:
parent
b3f1184b3b
commit
bb139480fb
@ -1,3 +1,20 @@
|
||||
import { NextResponse } from 'next/server';
|
||||
import type { NextRequest } from 'next/server';
|
||||
|
||||
export function middleware(request: NextRequest) {
|
||||
const { pathname } = request.nextUrl;
|
||||
if (pathname === '/lecoffre') {
|
||||
const url = request.nextUrl.clone();
|
||||
url.pathname = '/lecoffre/';
|
||||
return NextResponse.redirect(url, 308);
|
||||
}
|
||||
return NextResponse.next();
|
||||
}
|
||||
|
||||
export const config = {
|
||||
matcher: ['/lecoffre'],
|
||||
};
|
||||
|
||||
import { ICustomerJwtPayload, IUserJwtPayload } from "@Front/Services/JwtService/JwtService";
|
||||
import jwt_decode from "jwt-decode";
|
||||
import { NextResponse } from "next/server";
|
||||
|
Loading…
x
Reference in New Issue
Block a user