1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-05 17:53:12 +02:00

separate GET ui config to no auth

Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
andreas-unleash 2022-12-06 16:19:09 +02:00
parent a8f546ef5e
commit 70e5a6dde5
No known key found for this signature in database
GPG Key ID: DB82A1577B38F66B
2 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,7 @@ interface IUseUIConfigOutput {
}
const useUiConfig = (): IUseUIConfigOutput => {
const path = formatApiPath(`api/admin/ui-config`);
const path = formatApiPath(`api/ui-config`);
const { data, error, mutate } = useSWR<IUiConfig>(path, fetcher);
const isOss = useCallback(() => {

View File

@ -13,6 +13,7 @@ import ProxyController from './proxy-api';
import { conditionalMiddleware } from '../middleware';
import EdgeController from './edge-api';
import { PublicInviteController } from './public-invite';
import GetConfigController from './get-config';
class IndexRouter extends Controller {
constructor(config: IUnleashConfig, services: IUnleashServices) {
@ -42,6 +43,10 @@ class IndexRouter extends Controller {
this.use('/api/admin', new AdminApi(config, services).router);
this.use('/api/client', new ClientApi(config, services).router);
this.use(
'/api/ui-config',
new GetConfigController(config, services).router,
);
this.use(
'/api/frontend',