This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ app.set("view engine", "ejs");
3535
3636app . use ( ( req , res , next ) => {
3737 // set CORS header
38- if ( config [ "Network" ] [ "corsAllowOrigin" ] . length > 0 ) {
38+ if ( config [ "Network" ] [ "corsAllowOrigin" ] ) {
3939 res . header ( "Access-Control-Allow-Origin" , config [ "Network" ] [ "corsAllowOrigin" ] ) ;
4040 }
41- if ( config [ "Network" ] [ "corsAllowMethods" ] . length > 0 ) {
41+ if ( config [ "Network" ] [ "corsAllowMethods" ] ) {
4242 res . header ( "Access-Control-Allow-Methods" , config [ "Network" ] [ "corsAllowMethods" ] ) ;
4343 }
44- if ( config [ "Network" ] [ "corsAllowHeaders" ] . length > 0 ) {
44+ if ( config [ "Network" ] [ "corsAllowHeaders" ] ) {
4545 res . header ( "Access-Control-Allow-Headers" , config [ "Network" ] [ "corsAllowHeaders" ] ) ;
4646 }
4747
Original file line number Diff line number Diff line change @@ -85,13 +85,13 @@ const config: TriliumConfig = {
8585 process . env . TRILIUM_NETWORK_TRUSTEDREVERSEPROXY || iniConfig . Network . trustedReverseProxy || false ,
8686
8787 corsAllowOrigin :
88- process . env . TRILIUM_CORS_ALLOW_ORIGIN || iniConfig . Network . corsAllowOrigin || "" ,
88+ process . env . TRILIUM_NETWORK_CORS_ALLOW_ORIGIN || iniConfig . Network . corsAllowOrigin || "" ,
8989
9090 corsAllowMethods :
91- process . env . TRILIUM_CORS_ALLOW_METHODS || iniConfig . Network . corsAllowMethods || "" ,
91+ process . env . TRILIUM_NETWORK_CORS_ALLOW_METHODS || iniConfig . Network . corsAllowMethods || "" ,
9292
9393 corsAllowHeaders :
94- process . env . TRILIUM_CORS_ALLOW_HEADERS || iniConfig . Network . corsAllowHeaders || ""
94+ process . env . TRILIUM_NETWORK_CORS_ALLOW_HEADERS || iniConfig . Network . corsAllowHeaders || ""
9595 } ,
9696
9797 Session : {
You can’t perform that action at this time.
0 commit comments