envoyproxy / envoyproxy/gateway

replacePrefixMatch broken in main

Đang mở
#4,331 19 bình luận 7 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
Go
Star
3k
Fork
864
Merge trung bình
2 ngày 2 giờ
Pull request đã merge (30 ngày)
140

Mô tả

*Description*:
>What issue is being seen? Describe what should be happening instead of
the bug, for example: Envoy should not crash, the expected value isn't
returned, etc.

with envoy gateway 1.1 I was using following spec

```
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: /docs/
```

So my goal is to add `/docs/` prefix to all url paths. So it will be modified like `/docs/`.

With latest main the request path was modified only `/docs` (NOTE! missing last slash)

However, with latest main it will not add the ending slash anymore. I was forced to use

```
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: /docs//
```

to get same behaviour working.

*Repro steps*:
> Include sample requests, environment, etc. All data and inputs
required to reproduce the bug.

>**Note**: If there are privacy concerns, sanitize the data prior to
sharing.

*Environment*:
>Include the environment like gateway version, envoy version and so on.

eg 1.1 (envoy 1.31) and main (with envoy distroless-devel)

*Logs*:
>Include the access logs and the Envoy logs.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.