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

Support configuring approved redirect domains for ui/open-link

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
typescript
領域
api

調査の方向性

まず ui/open-link の処理を追跡し、SDK で openai/widgetCSP メタデータがどのように定義され、使用されているかを確認します。設定された redirect_domains に対する動作を確認してください。一致するリンクでは警告モーダルがスキップされ、redirectUrl クエリパラメータが付与される一方、その他のリンクでは既存の動作が維持されます。

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

説明

enhancement

Is your feature request related to a problem? Please describe.

Upon ui/open-link, ChatGPT shows a warning modal to the user, confirming that they intended to visit said page:

Image

However, the modal can be unnecessary (and annoying for users) if the app developer has genuine reasons to redirect/open a link that they control.

Secondarily, some apps have use cases where they want to ui/open-link a separate page for e.g. checkout and then redirect the user back to the conversation where they started.

Describe the solution you'd like

In the ChatGPT Apps SDK, we introduced ["openai/widgetCSP"].redirect_domains, an array of domains:

        _meta: {
          "openai/widgetCSP": {
            connect_domains: [],
            resource_domains: [],
            redirect_domains: ["https://*.company.com"],
          },

ui/open-link to any of these domains a/ won't trigger the safe link modal and b/ we attach a ?redirectUrl query param to the outgoing URL so that the destination can redirect the user back to where they came from at the end of their flow. (e.g. checkout)

Describe alternatives you've considered

Alternatives names I considered instead of redirect_domains:

  • safe_domains: while technically the modal is called the "safe link modal" (or something like that) and this disables that modal, just because a domain is in this config option doesn't mean it's safe. I also feel like this is too close to seem related to the "content security (safe) policy" even though it doesn't directly affect CSP.
  • return_to_chat_domains: more obvious, but so verbose and specific about the redirectUrl query param. Doesn't go as nicely with connect_domains and resource_domains.
  • interstitial_flow_domains: more focused on the purpose that the domains are used for, but kind of an awkward word. just flow_domains isn't enough. maybe just interstitial_domains…?
主要言語
TypeScript
スター
2.9k
フォーク
387
平均マージ
2時間 54分
マージ済み PR(30日)
7

環境構築

はじめの一歩

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

modelcontextprotocol/ext-apps のほかの issue

modelcontextprotocol/ext-apps の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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