fix: change to permanent redirects were applicable
This commit is contained in:
@@ -54,9 +54,10 @@ export const middleware: NextMiddleware = async (request) => {
|
||||
|
||||
if (matchedRedirect) {
|
||||
const newUrl = new URL(matchedRedirect, getPublicNextURL(request))
|
||||
headers.set("Cache-control", "public, max-age=60")
|
||||
headers.set("Cache-control", "public, max-age=14400") // 4 hours
|
||||
return NextResponse.redirect(newUrl, {
|
||||
headers,
|
||||
status: 308,
|
||||
})
|
||||
}
|
||||
headers.set("x-continue", "1")
|
||||
|
||||
Reference in New Issue
Block a user