File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,24 +56,24 @@ var proxy *goproxy.ProxyHttpServer
5656var cwd string
5757
5858func initServer () {
59- // Load the content types from the JSON file
60- data , err := os .ReadFile ( "proxySettings.json" )
59+ //Get the CWD of this application
60+ exe , err := os .Executable ( )
6161 if err != nil {
6262 panic (err )
6363 }
64+ cwd = filepath .Dir (exe )
6465
65- // Unmarshal the JSON data into a Config struct
66- err = json . Unmarshal ( data , & serverSettings )
66+ // Load the content types from the JSON file
67+ data , err := os . ReadFile ( filepath . Join ( cwd , "proxySettings.json" ) )
6768 if err != nil {
6869 panic (err )
6970 }
7071
71- //Get the CWD of this application
72- exe , err := os . Executable ( )
72+ // Unmarshal the JSON data into a Config struct
73+ err = json . Unmarshal ( data , & serverSettings )
7374 if err != nil {
7475 panic (err )
7576 }
76- cwd = strings .ReplaceAll (filepath .Dir (exe ), "\\ " , "/" )
7777
7878 //TODO: Update proxySettings.LegacyHTDOCSPath AND proxySettings.LegacyPHPPath for the default values!
7979
You can’t perform that action at this time.
0 commit comments