New API security
This commit is contained in:
parent
1959e1fd44
commit
d044c0f4cc
90 changed files with 538 additions and 132 deletions
|
@ -18,6 +18,7 @@ var _ provider.Provider = (*Provider)(nil)
|
|||
|
||||
// Provider is a provider.Provider implementation that provides a Rest API.
|
||||
type Provider struct {
|
||||
Insecure bool `description:"Activate REST Provider directly on the entryPoint named traefik." json:"insecure,omitempty" toml:"insecure,omitempty" yaml:"insecure,omitempty" export:"true"`
|
||||
configurationChan chan<- dynamic.Message
|
||||
}
|
||||
|
||||
|
@ -32,6 +33,13 @@ func (p *Provider) Init() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Handler creates an http.Handler for the Rest API
|
||||
func (p *Provider) Handler() http.Handler {
|
||||
router := mux.NewRouter()
|
||||
p.Append(router)
|
||||
return router
|
||||
}
|
||||
|
||||
// Append add rest provider routes on a router.
|
||||
func (p *Provider) Append(systemRouter *mux.Router) {
|
||||
systemRouter.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue