Repository navigation
fix: serve everything under path prefix when set - #3186
Conversation
|
I feel like this was this way for a reason before. I think the way it was intended to be used is to have a rewrite rule by any proxy in front of parca. |
| if pathPrefix != "" { | ||
| internalMux.Mount(pathPrefix+"/api", grpcWebMux) | ||
| } | ||
| internalMux.Mount("/api", grpcWebMux) |
There was a problem hiding this comment.
We could use a rewrite rule, but what's the purpose of this then? It feels like the other paths were overlooked. Otherwise, I'd remove this if-block and we do not change anything in the router when pathPrefix is set. WDYT?
metalmatze
left a comment
There was a problem hiding this comment.
I guess the idea was that because the API is part of our public API the prefix would be adjusted, whereas the internal APIs would stay the same. It would be more clear if those routers where served on different ports, but we have it on the same one.
Given we have it on the same port and use the same router in the end, I can see how being consistent with the prefix makes sense. 👍
562942d to
6f9d76b
Compare
|
Ah ok yes I think in the past we played around with separate ports. Lgtm then |
Serve everything under path prefix when
--path-prefixis set, including/metricsand/debug/pprof, and nothing directly from/