mirror of
https://github.com/jorgev259/soc_site-astro.git
synced 2025-06-29 07:57:41 +00:00
Disable paraglide middleware
This commit is contained in:
parent
ae22351367
commit
8ea95487dd
1 changed files with 5 additions and 2 deletions
|
|
@ -6,8 +6,10 @@ import PAGES from 'utils/pages.json'
|
||||||
import prismaClient from 'utils/prisma-client'
|
import prismaClient from 'utils/prisma-client'
|
||||||
|
|
||||||
export const onRequest = defineMiddleware(async (context, next) => {
|
export const onRequest = defineMiddleware(async (context, next) => {
|
||||||
|
const { request } = context
|
||||||
|
//paraglideMiddleware(request, async ({ locale, request }) => {
|
||||||
const isAuthed = await auth.api.getSession({
|
const isAuthed = await auth.api.getSession({
|
||||||
headers: context.request.headers
|
headers: request.headers
|
||||||
})
|
})
|
||||||
|
|
||||||
if (isAuthed) {
|
if (isAuthed) {
|
||||||
|
|
@ -31,5 +33,6 @@ export const onRequest = defineMiddleware(async (context, next) => {
|
||||||
context.locals.pages = []
|
context.locals.pages = []
|
||||||
}
|
}
|
||||||
|
|
||||||
return paraglideMiddleware(context.request, () => next())
|
return next()
|
||||||
|
//})
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue