Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 8e7f0f6

Browse files
committed
faet(docs): document the new CORS options
1 parent 2babc2c commit 8e7f0f6

File tree

4 files changed

+73
-1
lines changed

4 files changed

+73
-1
lines changed

docs/User Guide/!!!meta.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9968,6 +9968,26 @@
99689968
"format": "markdown",
99699969
"dataFileName": "Trilium instance.md",
99709970
"attachments": []
9971+
},
9972+
{
9973+
"isClone": false,
9974+
"noteId": "LWtBjFej3wX3",
9975+
"notePath": [
9976+
"pOsGYCXsbNQG",
9977+
"tC7s2alapj8V",
9978+
"Gzjqa934BdH4",
9979+
"LWtBjFej3wX3"
9980+
],
9981+
"title": "Cross-Origin Resource Sharing (CORS)",
9982+
"notePosition": 20,
9983+
"prefix": null,
9984+
"isExpanded": false,
9985+
"type": "text",
9986+
"mime": "text/html",
9987+
"attributes": [],
9988+
"format": "markdown",
9989+
"dataFileName": "Cross-Origin Resource Sharing .md",
9990+
"attachments": []
99719991
}
99729992
]
99739993
},
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Cross-Origin Resource Sharing (CORS)
2+
By default, Trilium cannot be accessed in web browsers by requests coming from other domains/origins than Trilium itself. 
3+
4+
However, it is possible to manually configure [Cross-Origin Resource Sharing (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS) since Trilium v0.93.0 using environment variables or `config.ini`, as follows:
5+
6+
<figure class="table" style="width:100%;"><table class="ck-table-resized"><colgroup><col style="width:26.93%;"><col style="width:32.46%;"><col style="width:40.61%;"></colgroup><thead><tr><th>CORS Header</th><th>Corresponding option in <code>config.ini</code></th><th>Corresponding option in environment variables in the <code>Network</code> section</th></tr></thead><tbody><tr><td><code>Access-Control-Allow-Origin</code></td><td><code>TRILIUM_NETWORK_CORS_ALLOW_ORIGIN</code></td><td><code>corsAllowOrigin</code>&nbsp;</td></tr><tr><td><code>Access-Control-Allow-Methods</code></td><td><code>TRILIUM_NETWORK_CORS_ALLOW_METHODS</code></td><td><code>corsAllowMethods</code>&nbsp;</td></tr><tr><td><code>Access-Control-Allow-Headers</code></td><td><code>TRILIUM_NETWORK_CORS_ALLOW_HEADERS</code></td><td><code>corsAllowHeaders</code></td></tr></tbody></table></figure>

src/public/app/doc_notes/en/User Guide/!!!meta.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/public/app/doc_notes/en/User Guide/User Guide/Advanced Usage/Configuration (config.ini or environment variables)/Cross-Origin Resource Sharing .html

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)