Support multiple API keys (command-line and config) (fixes #2747)

This commit is contained in:
Antony Male
2016-01-29 17:16:01 +00:00
parent 8ff7531f89
commit 5971c00a4f
5 changed files with 18 additions and 10 deletions

View File

@@ -478,7 +478,7 @@ func upgradeViaRest() error {
cfg, _ := loadConfig()
target := cfg.GUI().URL()
r, _ := http.NewRequest("POST", target+"/rest/system/upgrade", nil)
r.Header.Set("X-API-Key", cfg.GUI().APIKey())
r.Header.Set("X-API-Key", cfg.GUI().RawAPIKey)
tr := &http.Transport{
Dial: dialer.Dial,