🔨」 fix: changed to env

This commit is contained in:
2025-10-14 15:02:31 +02:00
parent c983f0f17d
commit f3bb3ce5eb
2 changed files with 3 additions and 1 deletions

View File

@ -24,3 +24,5 @@ SMTP_FROM=<the address to send from>
SMTP_AUTH_USERNAME=<smtp-user>
SMTP_AUTH_PASSWORD=<smtp pass>
EMAIL_TO=<mail to send to>
CORS_ORIGIN=<the url of origin for cors>

View File

@ -24,7 +24,7 @@ authDB.prepareDB();
export default async function(fastify, options) {
fastify.register(cors, {
origin: "http://localhost:5173",
origin: process.ENV.CORS_ORIGIN || '*',
credentials: true,
methods: [ "GET", "POST", "DELETE", "OPTIONS" ]
});