公開されるworkers.devホスト名を無効化する - #11
Merged
Merged
Conversation
Email Routing からのみ起動される Worker で `fetch` ハンドラを持たないため、 `email-notifier.<subdomain>.workers.dev` と各バージョンの Preview URL は 用途のない公開面になっていた。`routes` 未設定時 `workers_dev` は true が 既定なので、明示的に両方を無効化する。 併せて Wrangler のテレメトリ送信も送信しない設定にした。observability は email() の失敗を追う唯一の手段であり、記録先はアカウント内なので有効のまま 維持する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
wrangler.jsoncで公開ホスト名を無効化し、この Worker への公開 HTTP 入口をなくしたworkers_dev: false—email-notifier.<subdomain>.workers.devpreview_urls: false— バージョンごとの<version>-email-notifier.<subdomain>.workers.devsend_metrics: falseで Wrangler のテレメトリ送信を止めた設計判断
email()のみでfetchハンドラを持たないため、公開 URL は何も返さない。到達できても「デプロイが存在する」ことを外部に示すだけの公開面で、得るものがないobservability.enabledは有効のまま残すemail()の失敗を追える唯一の経路。出力先はアカウント内のログで公開されず、コードがログに出すのはエラーのみでメール本文は含まれないupload_source_maps/logpushは明示指定せず既定(オフ)のままレビュー観点
内部品質
外部品質
wrangler deploy --dry-runが警告なく完了することを確認(4.110.0、CI が使うバージョンと同じ)routes未設定 +workers_dev: falseでもアップロードは成立する。メールのトリガーは Email Routing 側のバインディングで、Worker の HTTP ルートとは独立しているためbun run typecheck/lint/test(18 tests)がいずれも成功。挙動を変える変更ではないためテストの追加はしていない補足
workers_devはroutes未設定時の既定が true。つまり今回の明示指定が入るまでは workers.dev ホスト名が有効な状態でデプロイされていたGenerated by Claude Code