Add a new protocol

Co-authored-by: Gérald Croës <gerald@containo.us>
This commit is contained in:
Julien Salleyron 2019-03-14 09:30:04 +01:00 committed by Traefiker Bot
parent 0ca2149408
commit 4a68d29ce2
231 changed files with 6895 additions and 4395 deletions

View file

@ -43,7 +43,7 @@ func (p *Provider) Append(systemRouter *mux.Router) {
return
}
configuration := new(config.Configuration)
configuration := new(config.HTTPConfiguration)
body, _ := ioutil.ReadAll(request.Body)
if err := json.Unmarshal(body, configuration); err != nil {
@ -52,7 +52,9 @@ func (p *Provider) Append(systemRouter *mux.Router) {
return
}
p.configurationChan <- config.Message{ProviderName: "rest", Configuration: configuration}
p.configurationChan <- config.Message{ProviderName: "rest", Configuration: &config.Configuration{
HTTP: configuration,
}}
if err := templatesRenderer.JSON(response, http.StatusOK, configuration); err != nil {
log.WithoutContext().Error(err)
}