Skip to main content
In v2.7.4, WebsiteReader, LLMsTxtReader, and WebSearchReader validate redirect targets through their HTTP request hooks. FirecrawlReader and DoclingReader validate the submitted URL, then delegate the fetch. Their allowed_hosts checks do not validate every downstream redirect.
ssrf_allowed_hosts.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your OpenAI API key

4

Run the example

Save the code above as ssrf_allowed_hosts.py, then run:
Full source: cookbook/07_knowledge/03_production/05_ssrf_allowed_hosts.py