mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 00:54:43 -04: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',
|
path: '/api/v2',
|
||||||
module: PublicApiModule,
|
module: PublicApiModule,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/api/private',
|
||||||
|
module: PrivateApiModule,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@Module({
|
@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(
|
app.useGlobalPipes(
|
||||||
new ValidationPipe({
|
new ValidationPipe({
|
||||||
forbidUnknownValues: true,
|
forbidUnknownValues: true,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue