Skip to content

Build your personal knowledge base with Trilium Notes

feat(client): point the blocked-requests toast at its fix

Elian Doran8980ca898400
diff --git a/apps/client/src/services/server.ts b/apps/client/src/services/server.ts
index 021974de52..5590cebe8e 100644
--- a/apps/client/src/services/server.ts
+++ b/apps/client/src/services/server.ts
@@ -1,6 +1,6 @@
import { t } from "./i18n.js";
import { getSetupAuthToken } from "./setup_auth.js";
-import utils, { isShare } from "./utils.js";
+import utils, { isShare, openInAppHelpFromUrl } from "./utils.js";
import ValidationError from "./validation_error.js";
type Headers = Record<string, string | null | undefined>;
@@ -320,10 +320,15 @@ async function reportError(method: string, url: string, statusCode: number, resp
} else {
if (statusCode === 400 && (url.includes("%23") || url.includes("%2F"))) {
toastService.showPersistent({
- id: "trafik-blocked",
+ id: "reverse-proxy-blocked",
icon: "bx bx-unlink",
- title: t("server.unknown_http_error_title"),
- message: t("server.traefik_blocks_requests")
+ title: t("server.reverse_proxy_blocked_title"),
+ message: t("server.reverse_proxy_blocked_message"),
+ buttons: [ {
+ text: t("active_content_badges.menu_docs"),
+ // The Traefik page of the User Guide, which documents the fix.
+ onClick: () => openInAppHelpFromUrl("5ERVJb9s4FRD")
+ } ]
});
} else {
toastService.showErrorTitleAndMessage(
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index d3cb03c2fa..ff39e811e6 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -3480,7 +3480,8 @@
"server": {
"unknown_http_error_title": "Communication error with the server",
"unknown_http_error_content": "Status code: {{statusCode}}\nURL: {{method}} {{url}}\nMessage: {{message}}",
- "traefik_blocks_requests": "If you are using the Traefik reverse proxy, it introduced a breaking change which affects the communication with the server."
+ "reverse_proxy_blocked_title": "Requests blocked by a reverse proxy",
+ "reverse_proxy_blocked_message": "Some requests were rejected (HTTP 400) before reaching Trilium, most likely by a reverse proxy that blocks percent-encoded characters in URLs.\n\nTraefik versions 3.6.4 to 3.6.6 do this by default: upgrade to Traefik 3.6.7 or newer, or allow encoded characters in its configuration."
},
"tab_history_navigation_buttons": {
"go-back": "Go back to previous note",