2025-04-18 16:10:44 +03:00

1.2 KiB

Cross-Origin Resource Sharing (CORS)

By default, Trilium cannot be accessed in web browsers by requests coming from other domains/origins than Trilium itself. 

However, it is possible to manually configure Cross-Origin Resource Sharing (CORS) since Trilium v0.93.0 using environment variables or config.ini, as follows:

CORS HeaderCorresponding option in config.iniCorresponding option in environment variables in the Network section
Access-Control-Allow-OriginTRILIUM_NETWORK_CORS_ALLOW_ORIGINcorsAllowOrigin 
Access-Control-Allow-MethodsTRILIUM_NETWORK_CORS_ALLOW_METHODScorsAllowMethods 
Access-Control-Allow-HeadersTRILIUM_NETWORK_CORS_ALLOW_HEADERScorsAllowHeaders