Files
open-webui/backend/open_webui/routers
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-06-29 01:38:41 -05:00
2026-09-21 10:44:37 -04:00
2026-09-21 08:59:39 -04:00
2026-09-21 08:59:39 -04:00
2026-09-21 11:09:09 -04:00
2026-09-21 10:19:59 -04:00
2026-09-23 23:36:15 -04:00
2026-06-29 05:47:21 -05:00
2026-09-21 10:19:59 -04:00
2026-09-16 00:34:24 -04:00
2026-09-21 10:25:20 -04:00
2026-09-22 13:13:22 -04:00
2026-07-27 19:39:36 -04:00
2026-08-31 00:39:16 -04:00
2026-09-17 20:11:05 -04:00
2026-08-11 01:15:05 -06:00
2026-09-21 10:30:53 -04:00
2026-09-21 08:31:27 -04:00
2026-09-07 14:46:52 -04:00
2026-09-06 17:27:30 -04:00