Skip to content

set shorter upstream request timeout on [endpoint] and [dynamic] badges #10996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Apr 4, 2025

We have a number of endpoints that allow the user to supply a URL to call.

We do impose a hard limit on the size of payload that a user can force us to download and parse, but beyond the global request timeout there's no limit on how long a user can force us to hold a connection open for.

On these endpoints where the user can give us an arbitrary URL to call, I propose we put a shorter timeout on how long we are prepared to wait for the upstream request. 3.5 seconds is still quite a long time if we are getting a flood of requests like that, but I feel like in the situation where the user supplies the URL we should be more pessimistic than when we are calling a known reputable host.

@chris48s chris48s added the service-badge New or updated service badge label Apr 4, 2025
Copy link
Contributor

github-actions bot commented Apr 4, 2025

Warnings
⚠️ This PR modified service code for dynamic but not its test code.
That's okay so long as it's refactoring existing code.
Messages
📖 ✨ Thanks for your contribution to Shields, @chris48s!

Generated by 🚫 dangerJS against dcaa552

@chris48s
Copy link
Member Author

TODO: update for #10985

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant