feat: implement billing, usage tracking, and administrative geocoding features in API with infrastructure updates
This commit is contained in:
Vendored
+14
-2
@@ -9,9 +9,21 @@ const swagger_1 = require("@nestjs/swagger");
|
||||
const helmet_1 = __importDefault(require("helmet"));
|
||||
const app_module_1 = require("./app.module");
|
||||
async function bootstrap() {
|
||||
const app = await core_1.NestFactory.create(app_module_1.AppModule);
|
||||
const app = await core_1.NestFactory.create(app_module_1.AppModule, {
|
||||
logger: ['error', 'warn', 'log', 'debug', 'verbose'],
|
||||
});
|
||||
const httpAdapter = app.getHttpAdapter();
|
||||
if (httpAdapter && httpAdapter.getInstance && typeof httpAdapter.getInstance().set === 'function') {
|
||||
httpAdapter.getInstance().set('trust proxy', 1);
|
||||
}
|
||||
app.use((0, helmet_1.default)());
|
||||
app.enableCors();
|
||||
app.enableCors({
|
||||
origin: process.env.ALLOWED_ORIGINS
|
||||
? process.env.ALLOWED_ORIGINS.split(',')
|
||||
: ['http://localhost:3204', 'http://localhost:5173', 'https://map-saas.intaleqapp.com'],
|
||||
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
|
||||
credentials: true,
|
||||
});
|
||||
app.setGlobalPrefix('api');
|
||||
app.useGlobalPipes(new common_1.ValidationPipe({
|
||||
whitelist: true,
|
||||
|
||||
Reference in New Issue
Block a user