Skip to content

Conversation

chocolatkey
Copy link
Member

@chocolatkey chocolatkey commented Aug 18, 2025

  • The --http-host-whitelist flag has been added to the serve command, to which a list of hosts can be passed. If at least one host is passed, access to streamed HTTP/HTTPS publications will be restricted to the provided hosts. A host like example.com can be further restricted to a "folder", such as example.com/the/path/
  • The --http-unsafe-requests flag has been added. It disabled restrictions that are enabled by default to prevent access to private IP addresses (such as internal infrastructure or localhost), and should be used with caution

Closes #49

Example to be able to stream https://github.com/IDPF/epub3-samples/releases/download/20230704/haruko-html-jpeg.epub: go run cmd/main.go serve -s http,https --http-host-whitelist https://github.com,https://release-assets.githubusercontent.com, since redirects are also checked

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.

White-list domains for HTTP/HTTPS streaming
1 participant