|
|
@@ -5,15 +5,19 @@ import * as fs from 'fs';
|
|
|
import * as path from 'path';
|
|
|
|
|
|
async function bootstrap() {
|
|
|
+ // const httpsOptions = {
|
|
|
+ // key: fs.readFileSync(path.resolve(__dirname, '../cert/localhost+1-key.pem')),
|
|
|
+ // cert: fs.readFileSync(path.resolve(__dirname, '../cert/localhost+1.pem')),
|
|
|
+ // };
|
|
|
const httpsOptions = {
|
|
|
- key: fs.readFileSync(path.resolve(__dirname, '../cert/localhost+1-key.pem')),
|
|
|
- cert: fs.readFileSync(path.resolve(__dirname, '../cert/localhost+1.pem')),
|
|
|
+ key: fs.readFileSync(path.resolve(__dirname, '../cert/key.pem')),
|
|
|
+ cert: fs.readFileSync(path.resolve(__dirname, '../cert/cert.pem')),
|
|
|
};
|
|
|
|
|
|
const app = await NestFactory.create(AppModule, { httpsOptions });
|
|
|
|
|
|
app.enableCors({
|
|
|
- origin: ['https://192.168.100.100:4200', 'https://192.168.100.79:4200', 'https://localhost:4200'],
|
|
|
+ origin: process.env.ALLOWED_ORIGINS?.split(','),
|
|
|
credentials: true,
|
|
|
});
|
|
|
|