Skip to content

Commit 1218009

Browse files
committed
++ fix for unknown paths
Signed-off-by: Ivan Mikheykin <[email protected]>
1 parent 7d0a5d2 commit 1218009

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

images/kube-api-proxy/pkg/rewriter/api_endpoint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ func (a *APIEndpoint) Clone() *APIEndpoint {
249249
}
250250

251251
func (a *APIEndpoint) Path() string {
252-
if a.IsUnknown || a.IsRoot {
252+
if a.IsRoot || a.IsCore || a.IsUnknown {
253253
return a.RawPath
254254
}
255255

images/kube-api-proxy/pkg/rewriter/rule_rewriter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const (
2424
// It assumes that ep contains original group and resourceType.
2525
// Restoring of path is not implemented.
2626
func (rw *RuleBasedRewriter) RewriteAPIEndpoint(ep *APIEndpoint) *APIEndpoint {
27-
// Leave paths /, /api, and /api/* as is.
28-
if ep.IsRoot || ep.IsCore {
27+
// Leave paths /, /api, /api/*, and unknown paths as is.
28+
if ep.IsRoot || ep.IsCore || ep.IsUnknown {
2929
return nil
3030
}
3131

0 commit comments

Comments
 (0)