File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,18 @@ func TibiaDataInitializer() {
8484
8585 // setting TibiaDataProxyDomain
8686 if isEnvExist ("TIBIADATA_PROXY" ) {
87- TibiaDataProxyDomain = "https://" + getEnv ("TIBIADATA_PROXY" , "www.tibia.com" ) + "/"
87+
88+ TibiaDataProxyProtocol := "https"
89+ if isEnvExist ("TIBIADATA_PROXY_PROTOCOL" ) {
90+ switch getEnv ("TIBIADATA_PROXY_PROTOCOL" , "https" ) {
91+ case "http" , "https" :
92+ default :
93+ TibiaDataProxyProtocol = "https"
94+ log .Printf ("[info] TibiaData API proxy protocol invalid.. using https." )
95+ }
96+ }
97+
98+ TibiaDataProxyDomain = TibiaDataProxyProtocol + "://" + getEnv ("TIBIADATA_PROXY" , "www.tibia.com" ) + "/"
8899 }
89100
90101 log .Printf ("[info] TibiaData API proxy: %s" , TibiaDataProxyDomain )
You can’t perform that action at this time.
0 commit comments