Skip to content

docs: 複数コードベースのホスト振り分け例を追加 (host routing sample) - #7690

Open
haranishi wants to merge 1 commit into
cloudflare:mainfrom
haranishi:docs/58-multiple-codebases-example
Open

haranishi wants to merge 1 commit into
cloudflare:mainfrom
haranishi:docs/58-multiple-codebases-example

Conversation

@haranishi

Copy link
Copy Markdown

1つのworkerdプロセスで複数のコードベースを動かす実行例を追加します。共通のHTTPソケットから、router Workerがホスト名に応じて2つのアプリへservice bindingでリクエストを転送し、未知のホストには404を返します。

READMEに起動方法、curlでの確認方法、信頼できるコードベース向けの構成であることを記載しました。

Add a runnable example for hosting multiple trusted codebases in one workerd process. A router Worker shares one HTTP socket and forwards requests to two separate application services through service bindings. Unknown hostnames return 404.

The README includes workerd/Bazel startup commands, curl examples, and the trust boundary discussed in #58. Each application has its own modules and compatibility date.

Validation:

  • Started the config with the published workerd 2026-04-05 binary.
  • Five HTTP checks passed: routing to each application, preserving path/query, unknown-host 404, rejecting a hostname suffix match, and handling an uppercase hostname with a port.
  • JavaScript syntax checks and git diff --check passed.
  • The native runtime was not rebuilt; this change adds sample files only.

Closes #58.

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@haranishi
haranishi marked this pull request as ready for review October 11, 2026 08:38
@haranishi
haranishi requested review from a team as code owners October 11, 2026 08:38
Copilot AI balanced review requested due to automatic review settings October 11, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@haranishi

Copy link
Copy Markdown
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation on multi-codebase environments?

2 participants