From fb5ff66af96fe2ded035db6db023fa89595c9275 Mon Sep 17 00:00:00 2001 From: Konstantinos Paparas Date: Wed, 2 Aug 2023 16:56:48 +0200 Subject: [PATCH] fix(csp): aborts spa navigation before location update To avoid slow updates causing CSP errors because of wrong headers --- middleware/csp.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/middleware/csp.ts b/middleware/csp.ts index cd80c1a4..9450a80a 100644 --- a/middleware/csp.ts +++ b/middleware/csp.ts @@ -6,6 +6,7 @@ import { isClient } from '@vueuse/core'; */ export default defineNuxtRouteMiddleware((to, from) => { if (isClient && from.path === '/checkout/payment-method') { + abortNavigation(); window.location.href = to.fullPath; } });