docker setup
This commit is contained in:
@@ -14,6 +14,18 @@ import { FeatureAvailabilityGuard } from './domain/policy/FeatureAvailabilityGua
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule, process.env.GENERATE_OPENAPI ? { logger: false } : undefined);
|
||||
|
||||
// Website runs on a different origin in dev/docker (e.g. http://localhost:3000 -> http://localhost:3001),
|
||||
// and our website HTTP client uses `credentials: 'include'`, so we must support CORS with credentials.
|
||||
app.enableCors({
|
||||
credentials: true,
|
||||
origin: (origin, callback) => {
|
||||
if (!origin) {
|
||||
return callback(null, false);
|
||||
}
|
||||
return callback(null, origin);
|
||||
},
|
||||
});
|
||||
|
||||
app.useGlobalPipes(
|
||||
new ValidationPipe({
|
||||
whitelist: true,
|
||||
|
||||
Reference in New Issue
Block a user