Skip to content

Build your personal knowledge base with Trilium Notes

docs(server/proxy): breaking change in Traefik 3.6.4

Elian Doran036f8e49a4b1
diff --git a/apps/server/docker/traefik/traefik.yml b/apps/server/docker/traefik/traefik.yml
index 4c582bd013..0fb59ab1d4 100644
--- a/apps/server/docker/traefik/traefik.yml
+++ b/apps/server/docker/traefik/traefik.yml
@@ -1,6 +1,10 @@
entryPoints:
web:
address: ":8090"
+ http:
+ encodedCharacters:
+ allowEncodedSlash: true
+ allowEncodedHash: true
providers:
file:
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Calendar.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Calendar.html
index 672edae1c3..a69329fce6 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Calendar.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Collections/Calendar.html
@@ -216,7 +216,7 @@
<tr>
<td><code>#calendar:color</code>
</td>
- <td><strong>❌️ Removed since v0.100.0. Use</strong> <code>**#color**</code> <strong>instead.</strong>
+ <td><strong>❌️ Removed since v0.100.0. Use</strong> <code>**#color**</code> <strong>instead.</strong>
<br>
<br>Similar to <code>#color</code>, but applies the color only for the event
in the calendar and not for other places such as the note tree.</td>
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.html
index b48e60addc..b2aea2650c 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.html
@@ -1,5 +1,24 @@
-<p>Configure Traefik proxy and HTTPS. See <a href="https://github.com/TriliumNext/Trilium/issues/7768#issuecomment-3539165814">#7768</a> for
- reference</p>
+<p>The goal of this article is to configure Traefik proxy and HTTPS. See
+ <a
+ href="https://github.com/TriliumNext/Trilium/issues/7768#issuecomment-3539165814">#7768</a>for reference.</p>
+<h2>Breaking change in Traefik 3.6.4</h2>
+<p>Traefik 3.6.4 introduced a <a href="https://doc.traefik.io/traefik/migrate/v3/#encoded-characters-in-request-path">breaking change</a> regarding
+ how percent-encoded characters are handled in URLs. More specifically some
+ URLs used by Trilium (such as <code spellcheck="false">search/%23workspace%20%23!template</code>)
+ are automatically rejected by Traefik, resulting in HTTP 400 errors.</p>
+<p>To solve this, the Traefik <a href="https://doc.traefik.io/traefik/getting-started/configuration-overview/#the-install-configuration"><strong>static</strong> configuration</a> must
+ be modified in order to allow those characters:</p><pre><code class="language-text-x-yaml">entryPoints:
+ web:
+ http:
+ encodedCharacters:
+ allowEncodedSlash: true
+ allowEncodedHash: true</code></pre>
+<aside class="admonition tip">
+ <p>If you still have issues, depending on how Trilium is used (especially
+ regarding search), you might need to enable more encoded character groups.
+ For more information, see <a href="https://github.com/TriliumNext/Trilium/issues/7968">the relevant GitHub issue</a>;
+ feel free to report your findings.</p>
+</aside>
<h3>Build the docker-compose file</h3>
<p>Setting up Traefik as reverse proxy requires setting the following labels:</p><pre><code class="language-text-x-yaml"> labels:
- traefik.enable=true
@@ -16,8 +35,8 @@
- traefik.http.middlewares.trilium-headers.headers.customrequestheaders.X-Forwarded-Proto=https</code></pre>
<h3>Setup needed environment variables</h3>
<p>After setting up a reverse proxy, make sure to configure the&nbsp;<a class="reference-link"
- href="#root/_help_LLzSMXACKhUs">[missing note]</a>.</p>
-<h3>Example <code>docker-compose.yaml</code></h3><pre><code class="language-text-x-yaml">services:
+ href="#root/_help_LLzSMXACKhUs">Trusted proxy</a>.</p>
+<h3>Example <code spellcheck="false">docker-compose.yaml</code></h3><pre><code class="language-text-x-yaml">services:
trilium:
image: triliumnext/trilium
container_name: trilium
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets.html
index 4f1d6731f3..2ef613b9b0 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets.html
@@ -1,33 +1,28 @@
-<p>Launch bar widgets are a subset of&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/yIhgI5H7A2Sm/_help_MgibgPcfeuGz">Custom Widgets</a>&nbsp;that
+<p>Launch bar widgets are a subset of&nbsp;<a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>&nbsp;that
can be used to render custom buttons and widgets inside the&nbsp;<a class="reference-link"
- href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
+ href="#root/_help_xYmIYSP6wE3F">Launch Bar</a>.</p>
<h2>Creating a launch bar widget</h2>
-<p>Unlike&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/yIhgI5H7A2Sm/_help_MgibgPcfeuGz">Custom Widgets</a>,
+<p>Unlike&nbsp;<a class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>,
the process of setting up a launch bar widget is slightly different:</p>
<ol>
- <li data-list-item-id="e3111af31ab8707d93fb9e7feb1ac804d">Create a Code note of type <em>JavaScript (front-end)</em>.
+ <li>Create a Code note of type <em>JavaScript (front-end)</em>.
<ul>
- <li data-list-item-id="ea71ac173fc302483b5f571fd8bbd4142">The script itself uses the same concepts as&nbsp;<a class="reference-link"
- href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/yIhgI5H7A2Sm/_help_MgibgPcfeuGz">Custom Widgets</a>,
- including the use of a <code spellcheck="false">NoteContextAwareWidget</code> or
- a <code spellcheck="false">BasicWidget</code> (according to needs).</li>
- <li
- data-list-item-id="e06c05a8bdfaa11ad4214ccc5405f50cc">As examples, see&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/yIhgI5H7A2Sm/4Gn3psZKsfSm/_help_IPArqVfDQ4We">Note Title Widget</a>&nbsp;and&nbsp;
+ <li>The script itself uses the same concepts as&nbsp;<a class="reference-link"
+ href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>, including the use of a <code>NoteContextAwareWidget</code> or
+ a <code>BasicWidget</code> (according to needs).</li>
+ <li>As examples, see&nbsp;<a class="reference-link" href="#root/_help_IPArqVfDQ4We">Note Title Widget</a>&nbsp;and&nbsp;
<a
- class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/yIhgI5H7A2Sm/4Gn3psZKsfSm/_help_gcI7RPbaNSh3">Analog Watch</a>.</li>
- </ul>
+ class="reference-link" href="#root/_help_gcI7RPbaNSh3">Analog Watch</a>.</li>
+ </ul>
</li>
- <li data-list-item-id="e31368cfb0655cfc527347b9dcbfa7d17">Don't set <code spellcheck="false">#widget</code>, as that attribute is
- reserved for&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/CdNpE2pqjmI6/yIhgI5H7A2Sm/_help_MgibgPcfeuGz">Custom Widgets</a>.</li>
- <li
- data-list-item-id="e26f51e3ad87cebfa6c72504dab691804">In the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_x3i7MxGccDuM">Global menu</a>,
+ <li>Don't set <code>#widget</code>, as that attribute is reserved for&nbsp;
+ <a
+ class="reference-link" href="#root/_help_MgibgPcfeuGz">Custom Widgets</a>.</li>
+ <li>In the&nbsp;<a class="reference-link" href="#root/_help_x3i7MxGccDuM">Global menu</a>,
select <em>Configure launchbar</em>.</li>
- <li data-list-item-id="ebd6a4fab8be5557cb958d6bf87b65d84">In the <em>Visible Launchers</em> section, select <em>Add a custom widget</em>.</li>
- <li
- data-list-item-id="ef1cb61670f561ad918be4f072d325bc7">Give the newly created launcher a name (and optionally a name).</li>
- <li
- data-list-item-id="e0b141f895a6a9973f31a71ba99471a49">In the&nbsp;<a class="reference-link" href="#root/pOsGYCXsbNQG/tC7s2alapj8V/zEY4DaJG4YT5/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;section,
- modify the <em>widget</em> field to point to the newly created note.</li>
- <li
- data-list-item-id="e5218927546ad96070b3028534e93131b">Refresh the UI.&nbsp;</li>
+ <li>In the <em>Visible Launchers</em> section, select <em>Add a custom widget</em>.</li>
+ <li>Give the newly created launcher a name (and optionally a name).</li>
+ <li>In the&nbsp;<a class="reference-link" href="#root/_help_OFXdgB2nNk1F">Promoted Attributes</a>&nbsp;section,
+ modify the <em>widget</em> field to point to the newly created note.</li>
+ <li>Refresh the UI.</li>
</ol>
\ No newline at end of file
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html
index f0fb7e5b6e..e9625e39b7 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Analog Watch.html
@@ -4,7 +4,7 @@
</figure>
<p>This is a more intricate example of a basic widget, which displays an
analog watch in the launch bar. Unlike note-context aware widgets, basic
- widgets don't react to note navigation.</p><pre><code class="language-application-javascript-env-frontend">const TPL = `
+ widgets don't react to note navigation.</p><pre><code class="language-application-javascript-env-backend">const TPL = `
&lt;div class="analog-watch" style="
position: relative;
height: 38px;
diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html
index 9549f5d81e..6e6da32731 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Scripting/Frontend Basics/Launch Bar Widgets/Note Title Widget.html
@@ -6,7 +6,7 @@
currently opened note and refreshes automatically as the user navigates
through the notes.</p>
<p>In this example, the title of the note is displayed. It works best on
- the <a href="#root/pOsGYCXsbNQG/gh7bpGYxajRS/Vc8PjrjAGuOp/_help_x0JgW8UqGXvq">horizontal layout</a>.</p><pre><code class="language-application-javascript-env-frontend">const TPL = `\
+ the <a href="#root/_help_x0JgW8UqGXvq">horizontal layout</a>.</p><pre><code class="language-application-javascript-env-backend">const TPL = `\
&lt;div style="
display: flex;
height: 53px;
diff --git a/docs/Developer Guide/Developer Guide/Documentation.md b/docs/Developer Guide/Developer Guide/Documentation.md
index 35bdcf0963..cb411c0f7c 100644
--- a/docs/Developer Guide/Developer Guide/Documentation.md
+++ b/docs/Developer Guide/Developer Guide/Documentation.md
@@ -1,5 +1,5 @@
# Documentation
-There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/hOX4EFIkAwyJ/Documentation_image.png" width="205" height="162">
+There are multiple types of documentation for Trilium:<img class="image-style-align-right" src="api/images/tZh9T30Ojdsq/Documentation_image.png" width="205" height="162">
* The _User Guide_ represents the user-facing documentation. This documentation can be browsed by users directly from within Trilium, by pressing <kbd>F1</kbd>.
* The _Developer's Guide_ represents a set of Markdown documents that present the internals of Trilium, for developers.
diff --git a/docs/User Guide/!!!meta.json b/docs/User Guide/!!!meta.json
index 7878fb2780..d846c6d274 100644
--- a/docs/User Guide/!!!meta.json
+++ b/docs/User Guide/!!!meta.json
@@ -15663,60 +15663,60 @@
"mime": "text/html",
"attributes": [
{
- "type": "label",
- "name": "iconClass",
- "value": "bx bx-dock-left",
+ "type": "relation",
+ "name": "internalLink",
+ "value": "MgibgPcfeuGz",
"isInheritable": false,
- "position": 30
+ "position": 10
},
{
- "type": "label",
- "name": "shareAlias",
- "value": "launch-bar-widgets",
+ "type": "relation",
+ "name": "internalLink",
+ "value": "xYmIYSP6wE3F",
"isInheritable": false,
- "position": 40
+ "position": 20
},
{
"type": "relation",
"name": "internalLink",
- "value": "MgibgPcfeuGz",
+ "value": "IPArqVfDQ4We",
"isInheritable": false,
- "position": 50
+ "position": 30
},
{
"type": "relation",
"name": "internalLink",
- "value": "xYmIYSP6wE3F",
+ "value": "gcI7RPbaNSh3",
"isInheritable": false,
- "position": 60
+ "position": 40
},
{
"type": "relation",
"name": "internalLink",
"value": "x3i7MxGccDuM",
"isInheritable": false,
- "position": 70
+ "position": 50
},
{
"type": "relation",
"name": "internalLink",
"value": "OFXdgB2nNk1F",
"isInheritable": false,
- "position": 80
+ "position": 60
},
{
- "type": "relation",
- "name": "internalLink",
- "value": "IPArqVfDQ4We",
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bx-dock-left",
"isInheritable": false,
- "position": 90
+ "position": 30
},
{
- "type": "relation",
- "name": "internalLink",
- "value": "gcI7RPbaNSh3",
+ "type": "label",
+ "name": "shareAlias",
+ "value": "launch-bar-widgets",
"isInheritable": false,
- "position": 100
+ "position": 40
}
],
"format": "markdown",
@@ -15741,6 +15741,13 @@
"type": "text",
"mime": "text/html",
"attributes": [
+ {
+ "type": "relation",
+ "name": "internalLink",
+ "value": "x0JgW8UqGXvq",
+ "isInheritable": false,
+ "position": 10
+ },
{
"type": "label",
"name": "shareAlias",
@@ -15754,13 +15761,6 @@
"value": "note-title-widget",
"isInheritable": false,
"position": 40
- },
- {
- "type": "relation",
- "name": "internalLink",
- "value": "x0JgW8UqGXvq",
- "isInheritable": false,
- "position": 50
}
],
"format": "markdown",
diff --git a/docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.md b/docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.md
index 1582093a44..6630185a58 100644
--- a/docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.md
+++ b/docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Traefik.md
@@ -1,5 +1,23 @@
# Traefik
-Configure Traefik proxy and HTTPS. See [#7768](https://github.com/TriliumNext/Trilium/issues/7768#issuecomment-3539165814) for reference
+The goal of this article is to configure Traefik proxy and HTTPS. See [#7768](https://github.com/TriliumNext/Trilium/issues/7768#issuecomment-3539165814) for reference.
+
+## Breaking change in Traefik 3.6.4
+
+Traefik 3.6.4 introduced a [breaking change](https://doc.traefik.io/traefik/migrate/v3/#encoded-characters-in-request-path) regarding how percent-encoded characters are handled in URLs. More specifically some URLs used by Trilium (such as `search/%23workspace%20%23!template`) are automatically rejected by Traefik, resulting in HTTP 400 errors.
+
+To solve this, the Traefik [**static** configuration](https://doc.traefik.io/traefik/getting-started/configuration-overview/#the-install-configuration) must be modified in order to allow those characters:
+
+```yaml
+entryPoints:
+ web:
+ http:
+ encodedCharacters:
+ allowEncodedSlash: true
+ allowEncodedHash: true
+```
+
+> [!TIP]
+> If you still have issues, depending on how Trilium is used (especially regarding search), you might need to enable more encoded character groups. For more information, see [the relevant GitHub issue](https://github.com/TriliumNext/Trilium/issues/7968); feel free to report your findings.
### Build the docker-compose file
@@ -23,7 +41,7 @@ Setting up Traefik as reverse proxy requires setting the following labels:
### Setup needed environment variables
-After setting up a reverse proxy, make sure to configure the <a class="reference-link" href="Trusted%20proxy.md">[missing note]</a>.
+After setting up a reverse proxy, make sure to configure the <a class="reference-link" href="Trusted%20proxy.md">Trusted proxy</a>.
### Example `docker-compose.yaml`