mirror of
https://github.com/KeyZox71/knl_meowscendence.git
synced 2026-01-01 06:06:41 +01:00
「🏗️」 wip: tmp commit, will be overriden later, can be ignored
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import fastifyJWT from '@fastify/jwt';
|
||||
import fastifyCookie from '@fastify/cookie';
|
||||
import cors from '@fastify/cors'
|
||||
|
||||
import { register } from './register.js';
|
||||
import { login } from './login.js';
|
||||
@ -22,6 +23,12 @@ authDB.prepareDB();
|
||||
*/
|
||||
export default async function(fastify, options) {
|
||||
|
||||
fastify.register(cors, {
|
||||
origin: "http://localhost:5173",
|
||||
credentials: true,
|
||||
methods: [ "GET", "POST", "DELETE", "OPTIONS" ]
|
||||
});
|
||||
|
||||
fastify.register(fastifyJWT, {
|
||||
secret: process.env.JWT_SECRET || '123456789101112131415161718192021',
|
||||
cookie: {
|
||||
|
||||
Reference in New Issue
Block a user