Skip to content

Commit

Permalink
http: fix pathPrefix used to look up remotecfg's components (#1501)
Browse files Browse the repository at this point in the history
Signed-off-by: Paschalis Tsilias <[email protected]>
  • Loading branch information
tpaschalis authored Aug 20, 2024
1 parent 5bca979 commit 6dff731
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/service/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ func (s *Service) Run(ctx context.Context, host service.Host) error {
}

// NOTE(@tpaschalis) These need to be kept in order for the longer
// remotecfg prefix to be invoked correctly.
r.PathPrefix(s.componentHttpPathPrefixRemotecfg).Handler(s.componentHandler(remoteCfgHostProvider(host), s.componentHttpPathPrefixRemotecfg))
// remotecfg prefix to be invoked correctly. The pathPrefix is still the
// same so that `remotecfg/` is not stripped from component lookups.
r.PathPrefix(s.componentHttpPathPrefixRemotecfg).Handler(s.componentHandler(remoteCfgHostProvider(host), s.componentHttpPathPrefix))
r.PathPrefix(s.componentHttpPathPrefix).Handler(s.componentHandler(rootHostProvider(host), s.componentHttpPathPrefix))

if s.opts.ReadyFunc != nil {
Expand Down

0 comments on commit 6dff731

Please sign in to comment.