mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-04-25 04:05:57 +03:00
[GH-ISSUE #914] [QUESTION / FEATURE] Log rate limiting #569
Labels
No labels
Fixed (Pending PR Merge)
Stale
bug
enhancement
enhancement
good first issue
help wanted
keep-open
needs more info
pull-request
question
theme
unfortunate
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/whoogle-search#569
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gitterspec on GitHub (Dec 25, 2022).
Original GitHub issue: https://github.com/benbusby/whoogle-search/issues/914
Not sure if this is already possible, but it would be nice to be able to set Whoogle to report rate limiting to the console or a log.
This would be useful for those with access to dynamic IPs to automatically request a new IP or to automatically redirect search queries to a different app.
@benbusby commented on GitHub (Dec 29, 2022):
Currently Whoogle returns a
503error code if an instance gets rate limited (and only in that scenario), which should be loggable depending on how you're running your instance. Does that suit your needs or do you need something more? I don't mind adding something extra, just let me know what exactly would work best for you.@gitterspec commented on GitHub (Dec 30, 2022):
The 503 would work if it could be reported by Whoogle, as opposed to requiring a proxy sitting outside that. Are you saying this is is already implemented? I checked the console running Whoogle the last time I was rate limited and don't recall seeing a message. Thanks.
@benbusby commented on GitHub (Dec 30, 2022):
Yes, the response code for the rate limiting page is a 503. I'm not able to manually force any of my personal instances into getting rate limited at the moment, and don't want to force any public ones to get rate limited to prove it, but the 503 response is in the code here:
github.com/benbusby/whoogle-search@253ea62f8f/app/routes.py (L328-L338)I'll close this for now, but reopen if you encounter the rate limiting issue and aren't actually getting the right error code.
@gitterspec commented on GitHub (Jan 1, 2023):
I just tested and the server did not log rate limiting in the console. Indeed, the client gets a 503, but this feature request is about the server, since it would be the server that would change IPs automatically.
Can you please re-open?
@benbusby commented on GitHub (Jan 4, 2023):
OK, rate limiting errors are now reported to the console. The reported error will look something like
ERROR:app:503 (CAPTCHA).@gitterspec commented on GitHub (Jan 4, 2023):
Thanks!