You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, is there a way to disable the NEXT_LOCALE cookie that gets created when using paraglide with the App Router? Currently we have tried to remove it via the middleware and even though it is no longer present in the browser, it still get's detected by cookie scanners.
TLDR - Add cookie or disableCookie property to Middleware options?
Can we remove this entirely somehow, perhaps via a config here:
exportconstmiddleware=Middleware({cookie: false, strategy });// Something like this?
Here is the code that removes it currently:
import{middlewareasi18nMiddleware}from'i18n';import{typeNextRequest}from'next/server';exportfunctionmiddleware(request: NextRequest){constlocale=i18nMiddleware.detectLanguage(request);constresponse=i18nMiddleware.getResponse(request,locale);response.cookies.delete('NEXT_LOCALE');returnresponse;}exportconstconfig={matcher: [// Skip Next.js internals and all static files, unless found in search params'/((?!_next|animations|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',// Always run for API routes'/(api|trpc)(.*)',],};
The text was updated successfully, but these errors were encountered:
Hi, is there a way to disable the NEXT_LOCALE cookie that gets created when using paraglide with the App Router? Currently we have tried to remove it via the middleware and even though it is no longer present in the browser, it still get's detected by cookie scanners.
TLDR - Add cookie or disableCookie property to Middleware options?
Can we remove this entirely somehow, perhaps via a config here:
Here is the code that removes it currently:
The text was updated successfully, but these errors were encountered: