add to cors, log level

This commit is contained in:
Will Freeman
2026-02-01 17:17:34 -07:00
parent 67a1e9dd66
commit afb7e7906c

View File

@@ -7,7 +7,7 @@ import { GithubClient, SponsorsResponseSchema } from './services/GithubClient';
const start = async () => {
const server: FastifyInstance = Fastify({
logger: {
level: 'info',
level: 'error',
transport: {
target: 'pino-pretty',
options: {
@@ -33,13 +33,14 @@ const start = async () => {
});
});
// CORS config
// Coors Light Config
await server.register(cors, {
origin: [
'http://localhost:8080',
'http://localhost:5173',
'http://localhost:5173', // vite dev server
'https://deflock.me',
'https://www.deflock.me',
'https://deflock.org', // will migrate
'https://www.deflock.org', // will migrate
],
methods: ['GET', 'HEAD'],
});