mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Updated to not set host if it's not in config file.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"iron": {
|
||||
"host": "staging-cache.iron.io",
|
||||
"cache_host": "staging-cache.iron.io",
|
||||
"project_id": "510d3381c2e603648d0005f5",
|
||||
"token": "liILas32ParkPtDfK9ztjWP_RI0",
|
||||
"super_token": "Lfvq3ev2DfyRebBn07hXZEvH3pQ",
|
||||
|
||||
@@ -34,7 +34,7 @@ var config struct {
|
||||
Token string `json:"token"`
|
||||
ProjectId string `json:"project_id"`
|
||||
SuperToken string `json:"super_token"`
|
||||
Host string `json:"host"`
|
||||
CacheHost string `json:"cache_host"`
|
||||
WorkerHost string `json:"worker_host"`
|
||||
} `json:"iron"`
|
||||
MongoAuth common.MongoConfig `json:"mongo_auth"`
|
||||
@@ -109,11 +109,14 @@ func main() {
|
||||
}
|
||||
ironAuth = common.NewIronAuth(session, config.MongoAuth.Database)
|
||||
|
||||
icache.Settings.UseConfigMap(map[string]interface{}{
|
||||
cacheConfigMap := map[string]interface{}{
|
||||
"token": config.Iron.Token,
|
||||
"project_id": config.Iron.ProjectId,
|
||||
"host": config.Iron.Host,
|
||||
})
|
||||
}
|
||||
if config.Iron.CacheHost != "" {
|
||||
cacheConfigMap["host"] = config.Iron.CacheHost
|
||||
}
|
||||
icache.Settings.UseConfigMap(cacheConfigMap)
|
||||
|
||||
r := mux.NewRouter()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user