Files
open-webui/backend/open_webui
Classic298 744ce6cbfe fix: send the configured USER_AGENT on the Attach Webpage pre-check (#30385)
Attach Webpage fails with 403 Forbidden on sites that reject the bare aiohttp user agent, Wikipedia among them, even when USER_AGENT is set. The web loader sends USER_AGENT, but the request that runs first to decide whether the URL is a page or a file does not, so the attachment fails before the loader is ever reached.

The pre-check now sends USER_AGENT as the request User-Agent when it is set. With it unset the request is unchanged and keeps the aiohttp default.

Verified against the real _fetch_url with https://en.wikipedia.org/wiki/OpenAI: 403 before, page detected after; USER_AGENT unset still returns the same 403 as before, and a direct PDF URL is still detected as a file.

Fixes #29617
2026-09-23 23:50:08 -04:00
..
2026-09-06 17:13:32 -04:00
2026-08-25 16:53:53 -04:00
2026-09-06 17:27:30 -04:00
2026-09-21 08:59:39 -04:00
2026-09-21 11:09:09 -04:00
2026-08-29 16:14:32 -04:00
2026-08-16 23:21:00 -07:00
2026-09-21 08:59:39 -04:00
2026-09-21 08:59:39 -04:00