Merged in fix/SW-3526-show-sas-eb-points-rate- (pull request #2973)
fix(SW-3526): Redirect user to login if points rate search and not logged in Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -5,10 +5,13 @@ import { Lang } from "@scandic-hotels/common/constants/language"
|
||||
import { logger } from "@scandic-hotels/common/logger"
|
||||
import { findLang } from "@scandic-hotels/common/utils/languages"
|
||||
|
||||
import * as bookingFlow from "@/middlewares/bookingFlow"
|
||||
import * as invalidUrl from "@/middlewares/invalidUrl"
|
||||
import * as trailingSlash from "@/middlewares/trailingSlash"
|
||||
import { getDefaultRequestHeaders } from "@/middlewares/utils"
|
||||
|
||||
import type { MiddlewareMatcher } from "./middlewares/types"
|
||||
|
||||
export const middleware: NextMiddleware = async (request, event) => {
|
||||
// auth() overrides the request origin, we need the original for internal rewrites
|
||||
// @see getInternalNextURL()
|
||||
@@ -31,12 +34,15 @@ export const middleware: NextMiddleware = async (request, event) => {
|
||||
}
|
||||
|
||||
// Note that the order of middlewares is important since that is the order they are matched by.
|
||||
const middlewares: { middleware: NextMiddleware; matcher: any }[] = [
|
||||
const middlewares: {
|
||||
middleware: NextMiddleware
|
||||
matcher: MiddlewareMatcher
|
||||
}[] = [
|
||||
invalidUrl,
|
||||
trailingSlash,
|
||||
// authRequired,
|
||||
// handleAuth,
|
||||
// bookingFlow,
|
||||
bookingFlow,
|
||||
// cmsContent,
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user