Skip to content

Commit

Permalink
support legacy endpoint
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Aug 26, 2024
1 parent 63e65f3 commit 8fb9feb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/http/services/wellknown/wellknown.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error)
func (s *svc) routerInit() error {
wkocmHandler := new(wkocmHandler)
wkocmHandler.init(&s.Conf.OCMProvider)
s.router.Get("/ocm", wkocmHandler.Ocm)
s.router.Get("/.well-known/ocm", wkocmHandler.Ocm)
s.router.Get("/ocm-provider", wkocmHandler.Ocm)
return nil
}

Expand All @@ -72,11 +73,11 @@ func (s *svc) Close() error {
}

func (s *svc) Prefix() string {
return ".well-known"
return ""
}

func (s *svc) Unprotected() []string {
return []string{"/", "/ocm"}
return []string{"/", "/.well-known/ocm", "/ocm-provider"}
}

func (s *svc) Handler() http.Handler {
Expand Down

0 comments on commit 8fb9feb

Please sign in to comment.