Enabling HSTS does crash the Admin as it fetches docs over http
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
レポートで本番環境のエントリーポイントとして特定されている parseHydraDocumentation.ts から開始し、docs.jsonld の URL 処理を api/frankenphp/Caddyfile の docs.jsonld ヘッダーと比較してください。プロトコルが選択される箇所を追跡し、HSTS を有効にした HTTPS 経由で Admin がドキュメントを取得でき、混在プロトコルによるクラッシュが発生しないことを確認してください。
索引モデルが issue の本文から書いたものです。
説明
API Platform version(s) affected: 4.1.0
Description
On Cloudflare we enabled HSTS to have strict https everywhere. The React Admin does fetch the docs.jsonld from http though. This results in a mixed-protocol exception.
How to reproduce
Only the Caddyfile seems to point to docs.jsonld by including that as header. The file is untouched since we started the project:
https://github.com/api-platform/api-platform/blob/main/api/frankenphp/Caddyfile#L42
Possible Solution
Not sure where the fetch gets initiated, but maybe not include the protocol so that gets determined by the initiator?
- http://foo.bar.com/docs.jsonld
+ //foo.bar.com/docs.jsonld
Does the docs url gets parsed client side or server side (read: next / node)?
Additional Context
- On localhost we have https as well, but cannot reproduce this as the docs.jsonld is properly fetched over https over there.
- On
productionI can narrow it down to the parseHydraDocumentation.ts file
- 主要言語
- TypeScript
- スター
- 515
- フォーク
- 134
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
api-platform/admin のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
api-platform/admin#616 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
api-platform/admin#660 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 50/100
api-platform/admin#659 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/admin#626 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
api-platform/admin#615 · コメント 4 件 · リアクション 2 件 ·
api-platform/admin の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
siyuan-note/siyuan#20040 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
RunestoneInteractive/rs#1574 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
remotion-dev/remotion#11901 ·
メンテナーはふだん 1 日以内に返信
-
Poll constructor throws for an uncached channel while resolving a message context-menu interactionオープンbug need repro packages:discord.js
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
discordjs/discord.js#11645 ·
メンテナーはふだん 3 日以内に返信
-
🐞 bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Sitecore/content-sdk#641 ·
メンテナーはふだん 2 日以内に返信