mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-23 01:12:37 +00:00
Merge pull request #1162 from hedgedoc/privateApi/fixes
This commit is contained in:
commit
2d79404c5e
2 changed files with 9 additions and 0 deletions
|
@ -38,6 +38,10 @@ const routes: Routes = [
|
|||
path: '/api/v2',
|
||||
module: PublicApiModule,
|
||||
},
|
||||
{
|
||||
path: '/api/private',
|
||||
module: PrivateApiModule,
|
||||
},
|
||||
];
|
||||
|
||||
@Module({
|
||||
|
|
|
@ -39,6 +39,11 @@ async function bootstrap(): Promise<void> {
|
|||
);
|
||||
}
|
||||
|
||||
app.enableCors({
|
||||
origin: appConfig.rendererOrigin,
|
||||
});
|
||||
logger.log(`Enabling CORS for '${appConfig.rendererOrigin}'`, 'AppBootstrap');
|
||||
|
||||
app.useGlobalPipes(
|
||||
new ValidationPipe({
|
||||
forbidUnknownValues: true,
|
||||
|
|
Loading…
Reference in a new issue