Redoing account section

This commit is contained in:
Eclypsed
2024-01-21 01:48:49 -05:00
parent 54309d06cf
commit 529e261023
9 changed files with 117 additions and 105 deletions

View File

@@ -4,7 +4,7 @@ import jwt from 'jsonwebtoken'
/** @type {import('@sveltejs/kit').Handle} */
export async function handle({ event, resolve }) {
const nonProtectedRoutes = ['/login']
const nonProtectedRoutes = ['/login', '/api']
const urlpath = event.url.pathname
if (urlpath.startsWith('/api') && event.request.headers.get('apikey') !== SECRET_INTERNAL_API_KEY && event.url.searchParams.get('apikey') !== SECRET_INTERNAL_API_KEY) {