Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

chore: redirect to login page if api reports unauthorized in admin page (#12726)

Jimmy Ben Klieve9ebbc5a74d56
diff --git a/web/src/services/admin-service.ts b/web/src/services/admin-service.ts
index 9314870e54..6aec2b89c4 100644
--- a/web/src/services/admin-service.ts
+++ b/web/src/services/admin-service.ts
@@ -49,6 +49,7 @@ request.interceptors.response.use(
authorizationUtil.removeAll();
history.push(Routes.Admin);
+ window.location.reload();
} else if (data?.code && data.code !== 0) {
notification.error({
message: `${i18n.t('message.hint')}: ${data?.code}`,
@@ -80,6 +81,7 @@ request.interceptors.response.use(
authorizationUtil.removeAll();
history.push(Routes.Admin);
+ window.location.reload();
} else if (data?.code && data.code !== 0) {
notification.error({
message: `${i18n.t('message.hint')}: ${data?.code}`,