mirror of
https://github.com/amineo/t2-stat-parser.git
synced 2026-07-13 15:24:35 +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.score += totalFlagScore;
|
||||||
game.teams.obs.players.push(p);
|
game.teams.obs.players.push(p);
|
||||||
}
|
}
|
||||||
console.log(player.stats.dtTeamGame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//const teamZero: any = game; //game.find(({ stats }) => stats.dtTeamGame[0] === '3');
|
//const teamZero: any = game; //game.find(({ stats }) => stats.dtTeamGame[0] === '3');
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,11 @@ import { AppModule } from './app.module';
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
|
|
||||||
|
app.enableCors({
|
||||||
|
origin: [ /\.localhost$/, /\.playt2\.com$/ ],
|
||||||
|
credentials: true
|
||||||
|
});
|
||||||
|
|
||||||
app.useGlobalPipes(
|
app.useGlobalPipes(
|
||||||
new ValidationPipe({
|
new ValidationPipe({
|
||||||
whitelist: true,
|
whitelist: true,
|
||||||
|
|
@ -27,7 +32,7 @@ async function bootstrap() {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
const document = SwaggerModule.createDocument(app, swaggerOptions);
|
const document = SwaggerModule.createDocument(app, swaggerOptions);
|
||||||
SwaggerModule.setup('api', app, document);
|
SwaggerModule.setup('docs', app, document);
|
||||||
|
|
||||||
await app.listen(3000);
|
await app.listen(3000);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue