[Bug]: CapacitorHttp: Authorization header not forwarded on 302 redirect (iOS only)

オープン
#8,116 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ios, swift

調査の方向性

リンクされている capacitor-http-troubleshoot の再現手順から始め、iOS、Android、web における POST リクエストの CapacitorHttp の挙動を比較します。iOS の CapacitorHttp におけるリダイレクト処理を調査します。302 リダイレクト後のリクエストで Authorization ヘッダーが保持され、他のプラットフォームにリグレッションが発生しないことをもって完了とします。

索引モデルが issue の本文から書いたものです。

説明

triage
Capacitor Version

Latest Dependencies:

@capacitor/cli: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3
@capacitor/ios: 7.4.3

Installed Dependencies:

@capacitor/cli: 7.4.3
@capacitor/ios: 7.4.3
@capacitor/core: 7.4.3
@capacitor/android: 7.4.3

Other API Details
npm --version output: 11.4.2
node --version output: v24.3.0
pod --version output: 1.16.2
Platforms Affected
  • iOS
  • Android
  • Web
Current Behavior

When using the CapacitorHttp plugin, Authorization header is not included in the redirected request on iOS. On Android, and when running as a web app on iOS/mac, the header is forwarded as expected. It also works when CapacitorHttp is disabled. This issue appears to affect only POST requests with 302 redirects.

Expected Behavior

Authorization header from the POST request should be included in the redirect request.

Project Reproduction

https://github.com/ruifang/capacitor-http-troubleshoot

Additional Information

Http request used in example:

POST /redirect-to?url=headers HTTP/1.1
Host: httpbingo.org
Authorization: Bearer 1234
X-Custom-Header: 123456

iOS:
https://github.com/user-attachments/assets/bf413401-c37b-4005-88d9-dae325103725
Safari:
https://github.com/user-attachments/assets/7b0e57c7-7811-4886-958d-d5314271ea23
Android:
https://github.com/user-attachments/assets/653e63f7-34a8-44fa-b0ba-47a2c3fb224e

主要言語
TypeScript
スター
17.1k
フォーク
1.3k
平均マージ
1日 22時間
マージ済み PR(30日)
26

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/capacitor のほかの issue

ionic-team/capacitor の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。