Screwed around with the layout a bit

This commit is contained in:
Eclypsed
2024-01-13 02:36:53 -05:00
parent 8acf9b3c46
commit 951575c284
13 changed files with 79 additions and 155 deletions

View File

@@ -7,7 +7,7 @@ export async function handle({ event, resolve }) {
const nonProtectedRoutes = ['/login']
const urlpath = event.url.pathname
if (urlpath.startsWith('/api') && event.request.headers.get('apikey') !== SECRET_INTERNAL_API_KEY) {
if (urlpath.startsWith('/api') && event.request.headers.get('apikey') !== SECRET_INTERNAL_API_KEY && event.url.searchParams.get('apikey') !== SECRET_INTERNAL_API_KEY) {
return new Response('Unauthorized', { status: 400 })
}