ability to rewrite location and cookies on v1-toolkit proxies
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Bắt đầu với cấu hình proxy trong ionic.config.json và xem xét fork v1-toolkit-proxy-rewrite-location-and-cookie được liên kết. Kiểm tra cách CLI sử dụng http-proxy-middleware và xác định xem việc viết lại cookie-domain, viết lại Location, gỡ lỗi và các đích proxy động dựa trên đường dẫn có thể được xác định phạm vi cùng nhau hay không. Công việc được xem là hoàn tất khi có phạm vi tính năng đã thống nhất và một triển khai được chấp nhận cho các hành vi proxy đã chọn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Our app runs ionic v1 and until now we used Chrome with some security settings turned off when testing our app in order to avoid most cross-origin issues like CORS and cookie samesite over HTTP when we call our REST API.
Recently Chrome 94 dropped support of some flags we really need like SameSiteByDefaultCookies or CookiesWithoutSameSiteMustBeSecure.
So we decided to use ionic's proxies feature which is configurable in ionic.config.json.
Unfortunately we went through some impediments:
- one of our api does some redirection (like
http://testserver302-redirects tohttp://testserver/otherapi) - on production servers, some cookies have a domain set, which of course won't match the local test server entry point (usually http://localhost:8100)
- we have a lot of different test servers, this would require a lot of entries in the proxies array.
To cover cases 1) and 2), we implemented new settings for the proxy (development has started on a fork):
cookieDomainRewrite: { [domain: string]: string };turns on rewriting cookie domain on set-cookie headerslocationRewrite: booleanturns on rewriting location host+port AND path on redirection. For example if you proxy/apitohttp://testserverthen a headerLocation: http://testserver/otherapiwould be rewritten toLocation: http://localhost:8100/api/otherapi.debug: booleanturns on verbose debugging ofhttp-proxy-middleware
I know v1 is quite old, but could these features be of interest for other users and so we might open a pull request ? Or maybe you have some suggestions ?
For case 3) we are willing to implement dynamic proxy based on path. The idea is to redirect on a different server based on a part of the path. Something that would be configurable this way:
{
"path": "/api/*",
"proxyUrl": "http://$1/"
}
- Ngôn ngữ chính
- TypeScript
- Star
- 2k
- Fork
- 681
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ionic-team/ionic-cli
-
triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
ionic-team/ionic-cli#5016 ·
-
ionic-cli development status Đang mởtriage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
ionic-team/ionic-cli#5131 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
ionic-team/ionic-cli#5130 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
ionic-team/ionic-cli#5129 ·
-
triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
ionic-team/ionic-cli#5127 · 2 bình luận ·
Tất cả issue của ionic-team/ionic-cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·