Skip to content

Build your personal knowledge base with Trilium Notes

add CORS settings in config-sample.ini

Yiran Lue6ccd88abb35
diff --git a/config-sample.ini b/config-sample.ini
index 83f10c4f77..f897901639 100644
--- a/config-sample.ini
+++ b/config-sample.ini
@@ -25,6 +25,11 @@ keyPath=
# expressjs shortcuts are supported: loopback(127.0.0.1/8, ::1/128), linklocal(169.254.0.0/16, fe80::/10), uniquelocal(10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, fc00::/7)
trustedReverseProxy=false
+# setting the CORS headers for cross-origin requests
+# corsAllowOrigin='*'
+# corsAllowMethods='GET,POST,PUT,DELETE,PATCH'
+# corsAllowHeaders='Content-Type,Authorization'
+
[Session]
# Use this setting to set a custom value for the "Max-Age" Attribute of the session cookie.