forked from Ivasoft/traefik
Enhance REST provider
This commit is contained in:
committed by
Traefiker Bot
parent
48d98dcf45
commit
51486b18fa
@@ -48,7 +48,7 @@ func (p *Provider) Append(systemRouter *mux.Router) {
|
||||
return
|
||||
}
|
||||
|
||||
configuration := new(dynamic.HTTPConfiguration)
|
||||
configuration := new(dynamic.Configuration)
|
||||
body, _ := ioutil.ReadAll(request.Body)
|
||||
|
||||
if err := json.Unmarshal(body, configuration); err != nil {
|
||||
@@ -57,9 +57,7 @@ func (p *Provider) Append(systemRouter *mux.Router) {
|
||||
return
|
||||
}
|
||||
|
||||
p.configurationChan <- dynamic.Message{ProviderName: "rest", Configuration: &dynamic.Configuration{
|
||||
HTTP: configuration,
|
||||
}}
|
||||
p.configurationChan <- dynamic.Message{ProviderName: "rest", Configuration: configuration}
|
||||
if err := templatesRenderer.JSON(response, http.StatusOK, configuration); err != nil {
|
||||
log.WithoutContext().Error(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user