fix(core): Block Public API related REST calls when Public API is not enabled (#9521)
This commit is contained in:
committed by
GitHub
parent
e07de837b9
commit
ac4e0fbb47
@@ -31,6 +31,7 @@ import type { CommunityPackagesService } from '@/services/communityPackages.serv
|
||||
import { Logger } from '@/Logger';
|
||||
import { UrlService } from './url.service';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { isApiEnabled } from '@/PublicApi';
|
||||
|
||||
@Service()
|
||||
export class FrontendService {
|
||||
@@ -143,7 +144,7 @@ export class FrontendService {
|
||||
},
|
||||
},
|
||||
publicApi: {
|
||||
enabled: !config.get('publicApi.disabled') && !this.license.isAPIDisabled(),
|
||||
enabled: isApiEnabled(),
|
||||
latestVersion: 1,
|
||||
path: config.getEnv('publicApi.path'),
|
||||
swaggerUi: {
|
||||
|
||||
Reference in New Issue
Block a user