ability to rewrite location and cookies on v1-toolkit proxies
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
ionic.config.json のプロキシ設定から始め、リンクされている v1-toolkit-proxy-rewrite-location-and-cookie fork を確認します。CLI が http-proxy-middleware をどのように使用しているかを確認し、Cookie ドメインの書き換え、Location の書き換え、デバッグ、動的なパスベースのプロキシターゲットをまとめてスコープ化できるか判断します。選択したプロキシ動作について、合意された機能範囲と承認済みの実装があれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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/"
}
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 681
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ionic-team/ionic-cli のほかの issue
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
ionic-team/ionic-cli#5016 ·
-
triage
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
ionic-team/ionic-cli#5131 ·
-
triage
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
ionic-team/ionic-cli#5130 ·
-
triage
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
ionic-team/ionic-cli#5129 ·
-
triage
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
ionic-team/ionic-cli#5127 · コメント 2 件 ·
ionic-team/ionic-cli の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100