trips) adding initial commit

This commit is contained in:
2026-02-18 20:23:34 -05:00
commit 1068145261
67 changed files with 3602 additions and 0 deletions

15
src/hooks.server.ts Normal file
View File

@@ -0,0 +1,15 @@
import { handle as authHandle } from './auth.js';
import { sequence } from '@sveltejs/kit/hooks';
import type { Handle } from '@sveltejs/kit';
// When behind a reverse proxy that terminates SSL, rewrite the request URL
// to use https so that SvelteKit generates correct absolute URLs and form actions.
const httpsProxy: Handle = async ({ event, resolve }) => {
const proto = event.request.headers.get('x-forwarded-proto');
if (proto === 'https' && event.url.protocol === 'http:') {
event.url.protocol = 'https:';
}
return resolve(event);
};
export const handle = sequence(httpsProxy, authHandle);