Skip to content

implement --allowed-hosts flag#953

Draft
velzie wants to merge 4 commits intohttp-party:masterfrom
velzie:feat/allowed-hosts
Draft

implement --allowed-hosts flag#953
velzie wants to merge 4 commits intohttp-party:masterfrom
velzie:feat/allowed-hosts

Conversation

@velzie
Copy link
Contributor

@velzie velzie commented Feb 1, 2026

The --allowed-hosts flag allows users to block requests with Host headers that aren't whitelisted, preventing against DNS rebinding attacks

Relevant issues

Fixes #758

Contributor checklist
  • Provide tests for the changes (unless documentation-only)
  • Documented any new features, CLI switches, etc. (if applicable)
    • Server --help output
    • README.md
    • doc/http-server.1 (use the same format as other entries)
  • The pull request is being made against the master branch
Maintainer checklist
  • Assign a version triage tag
  • Approve tests if applicable

@velzie
Copy link
Contributor Author

velzie commented Feb 1, 2026

We might want to add more validation to the argument - I can see users passing in something like --allowed-hosts=localhost:8080 which would break, but maybe we should leave that until the options refactor

@velzie velzie marked this pull request as draft February 1, 2026 18:49
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.

Host header check

1 participant