Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Enabling HSTS does crash the Admin as it fetches docs over http

オープン
#631 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
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 production I can narrow it down to the parseHydraDocumentation.ts file
Image
主要言語
TypeScript
スター
515
フォーク
134
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

api-platform/admin のほかの issue

api-platform/admin の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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