Merge pull request #1162 from hedgedoc/privateApi/fixes

This commit is contained in:
David Mehren 2021-05-02 17:39:51 +02:00 committed by GitHub
commit 2d79404c5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -38,6 +38,10 @@ const routes: Routes = [
path: '/api/v2', path: '/api/v2',
module: PublicApiModule, module: PublicApiModule,
}, },
{
path: '/api/private',
module: PrivateApiModule,
},
]; ];
@Module({ @Module({

View file

@ -39,6 +39,11 @@ async function bootstrap(): Promise<void> {
); );
} }
app.enableCors({
origin: appConfig.rendererOrigin,
});
logger.log(`Enabling CORS for '${appConfig.rendererOrigin}'`, 'AppBootstrap');
app.useGlobalPipes( app.useGlobalPipes(
new ValidationPipe({ new ValidationPipe({
forbidUnknownValues: true, forbidUnknownValues: true,