first
This commit is contained in:
@@ -8,6 +8,11 @@ import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import { join } from 'path';
|
||||
|
||||
async function bootstrap() {
|
||||
/**
|
||||
* Configura timezone para horário brasileiro
|
||||
*/
|
||||
process.env.TZ = 'America/Sao_Paulo';
|
||||
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||
|
||||
app.use(helmet({
|
||||
@@ -46,8 +51,8 @@ async function bootstrap() {
|
||||
|
||||
app.enableCors({
|
||||
origin: process.env.NODE_ENV === 'production'
|
||||
? ['https://seu-dominio.com', 'https://admin.seu-dominio.com']
|
||||
: '*',
|
||||
? ['https://www.jurunense.com', 'https://*.jurunense.com']
|
||||
: ['http://localhost:9602 add '],
|
||||
methods: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
|
||||
credentials: true,
|
||||
allowedHeaders: ['Content-Type', 'Authorization', 'Accept'],
|
||||
|
||||
Reference in New Issue
Block a user