mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-23 15:48:33 +00:00
chore: changes origins to view whitelisted origins in backend (#70)
This commit is contained in:
parent
22aa8ee334
commit
2435436580
@ -26,7 +26,7 @@ import { ThrottlerModule } from '@nestjs/throttler';
|
|||||||
buildSchemaOptions: {
|
buildSchemaOptions: {
|
||||||
numberScalarMode: 'integer',
|
numberScalarMode: 'integer',
|
||||||
},
|
},
|
||||||
cors: process.env.PRODUCTION !== 'true' && {
|
cors: {
|
||||||
origin: process.env.WHITELISTED_ORIGINS.split(','),
|
origin: process.env.WHITELISTED_ORIGINS.split(','),
|
||||||
credentials: true,
|
credentials: true,
|
||||||
},
|
},
|
||||||
|
@ -37,7 +37,8 @@ async function bootstrap() {
|
|||||||
console.log('Enabling CORS with production settings');
|
console.log('Enabling CORS with production settings');
|
||||||
|
|
||||||
app.enableCors({
|
app.enableCors({
|
||||||
origin: true,
|
origin: process.env.WHITELISTED_ORIGINS.split(','),
|
||||||
|
credentials: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
app.enableVersioning({
|
app.enableVersioning({
|
||||||
|
Loading…
Reference in New Issue
Block a user