mirror of
https://github.com/docmost/docmost.git
synced 2026-09-11 07:56:54 +08:00
feat(beta): public spaces (#2473)
This commit is contained in:
@@ -32,6 +32,13 @@ api.interceptors.response.use(
|
||||
const url = new URL(error.request.responseURL)?.pathname;
|
||||
if (url === "/api/auth/collab-token") return;
|
||||
if (window.location.pathname.startsWith("/share/")) return;
|
||||
// public docs probe authed endpoints; reject without the login redirect
|
||||
if (
|
||||
window.location.pathname === "/docs" ||
|
||||
window.location.pathname.startsWith("/docs/")
|
||||
) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Handle unauthorized error
|
||||
redirectToLogin();
|
||||
|
||||
@@ -43,6 +43,10 @@ export function isCloud(): boolean {
|
||||
return castToBoolean(getConfigValue("CLOUD"));
|
||||
}
|
||||
|
||||
export function isBetaPublicSpaces(): boolean {
|
||||
return castToBoolean(getConfigValue("BETA_PUBLIC_SPACES"));
|
||||
}
|
||||
|
||||
export function getAiVectorDriver(): string {
|
||||
return getConfigValue("AI_VECTOR_DRIVER");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user