[GH-ISSUE #1024] Rag/Web requests have empty user_agent header causing rejection from some web sites #50968

Closed
opened 2026-05-05 11:40:10 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @fbirlik on GitHub (Mar 3, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1024

Bug Report

Description

Bug Summary:
Rag/Web requests (#url..) have empty User-Agent header causing some web sites denying the request

Expected Behavior:
Either a fix User-Agent or random User-Agent to imitate a real browser

Note

langchain_community.WebBaseLoader class used to fetch web pages has support for generating fake user agents using fake_useragent package in default use case. Installing this package is enough to start generating user agents.

Screenshot 2024-03-03 at 2 15 18 PM
Originally created by @fbirlik on GitHub (Mar 3, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1024 # Bug Report ## Description **Bug Summary:** Rag/Web requests (#url..) have empty User-Agent header causing some web sites denying the request **Expected Behavior:** Either a fix User-Agent or random User-Agent to imitate a real browser ## Note langchain_community.WebBaseLoader class used to fetch web pages has support for generating fake user agents using fake_useragent package in default use case. Installing this package is enough to start generating user agents. <img width="651" alt="Screenshot 2024-03-03 at 2 15 18 PM" src="https://github.com/open-webui/open-webui/assets/31392854/0afb4965-06b8-4251-bde0-7f6d287a373b">
Author
Owner

@fbirlik commented on GitHub (Mar 3, 2024):

Following PR adds necessary package to requirements.txt. Tested with docker image
#1023

<!-- gh-comment-id:1975286073 --> @fbirlik commented on GitHub (Mar 3, 2024): Following PR adds necessary package to requirements.txt. Tested with docker image #1023
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#50968