mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-03-04 12:20:21 +00:00
Enable cors
This commit is contained in:
parent
d85896dcaa
commit
86c531d61e
2 changed files with 6 additions and 2 deletions
|
|
@ -66,7 +66,6 @@ export class GameService {
|
|||
game.teams.obs.score += totalFlagScore;
|
||||
game.teams.obs.players.push(p);
|
||||
}
|
||||
console.log(player.stats.dtTeamGame);
|
||||
}
|
||||
|
||||
//const teamZero: any = game; //game.find(({ stats }) => stats.dtTeamGame[0] === '3');
|
||||
|
|
|
|||
|
|
@ -7,6 +7,11 @@ import { AppModule } from './app.module';
|
|||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
|
||||
app.enableCors({
|
||||
origin: [ /\.localhost$/, /\.playt2\.com$/ ],
|
||||
credentials: true
|
||||
});
|
||||
|
||||
app.useGlobalPipes(
|
||||
new ValidationPipe({
|
||||
whitelist: true,
|
||||
|
|
@ -27,7 +32,7 @@ async function bootstrap() {
|
|||
.build();
|
||||
|
||||
const document = SwaggerModule.createDocument(app, swaggerOptions);
|
||||
SwaggerModule.setup('api', app, document);
|
||||
SwaggerModule.setup('docs', app, document);
|
||||
|
||||
await app.listen(3000);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue