Skip to content

Conversation

@SharkFishDeveloper
Copy link

Fixes #2554

Some external services reject requests made by Cog when fetching input URLs
because the default python-requests User-Agent is blocked or disallowed.

Previously, Cog used requests.get() without any way for users to configure
request headers. This caused URL fetches to fail for certain providers.

This change allows users to configure the User-Agent via an environment
variable (COG_USER_AGENT). If the variable is set, it is included in the
request headers; otherwise, the existing behavior remains unchanged.

This provides a simple, backward-compatible way to avoid request rejections
without modifying Cog internals or re-hosting input files.

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.

please make user agent string configurable

1 participant