[Bug]: host-rewrite policy documentation lists fewer allowed host characters than the policy accepts

Đang mở Phù hợp với người mới
#4,355 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
91/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
documentation

Hướng nghiên cứu

Đọc phần "User Parameters (API Definition)" trong docs/host-rewrite/v1.1/docs/host-rewrite.md và so sánh mô tả về các ký tự được phép với mẫu trong policies/host-rewrite/policy-definition.yaml. Cập nhật tài liệu để bổ sung dấu hai chấm mà schema đã chấp nhận. Hoàn tất khi bảng tham số mô tả chính xác các ký tự được chấp nhận trong host, bao gồm các cổng như backend.example.com:8080.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Area/Policies Aspect/Other Severity/Trivial Type/Bug
Please select the area the issue is related to

Gateway

Please select the aspect the issue is related to

Aspect/Other (Anything else which does not match above categories)

Description

The parameter table in the host-rewrite policy documentation says the host value allows letters, digits, - and .. The policy's schema also allows :.

  • Doc: docs/host-rewrite/v1.1/docs/host-rewrite.md in wso2/gateway-controllers, section "User Parameters (API Definition)": "Allowed characters: letters, digits, - and .."
  • Schema: policies/host-rewrite/policy-definition.yaml, pattern: "^[a-zA-Z0-9.:-]+$".

The doc's own Notes section says a port may be included, for example backend.example.com:8080. That needs :. The integration tests confirm a host with a port is accepted and sent upstream unchanged.

Steps to Reproduce
  1. Read the parameter table in docs/host-rewrite/v1.1/docs/host-rewrite.md.
  2. Compare it with the pattern in policies/host-rewrite/policy-definition.yaml.
  3. Deploy an API with host-rewrite host: backend.example.com:8080 and hostRewrite: manual on the upstream.
  4. The API is accepted, and the upstream receives Host: backend.example.com:8080.
Severity Level of the Issue

Severity/Trivial (Cosmetic issues. Can be fixed in future releases)

Environment Details (with versions)
  • host-rewrite policy v1.1.0, built from wso2/gateway-controllers source (commit 4f1520a8). Doc v1.1.
  • Gateway 1.1.0, 1.2.0 and main (main-a7e8774).
Ngôn ngữ chính
Go
Star
85
Fork
137
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
247

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wso2/api-platform

Tất cả issue của wso2/api-platform

Issue tương tự

Thêm issue về Go

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.