Skip to content
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

Implemented the media proxy and authenticated (user & token) API as env #2998

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MagicLike
Copy link

Based upon the customisations made by tech.lgbt¹ I implemented a way of controlling the API request limits for the media proxy as well as the authenticated user and token API. The possibility of easily upping the media proxy limits helps with not getting rate limited by opening a profile's media tab or having a lot of media being dropped on the own timeline. Upping the authenticated API limits should also be more easy for the sake of API tools which would get rate-limited pretty fast otherwise.

Thanks to @ShadowJonathan for bringing the mentioned customisations to my attention and helping me out.

¹Specifically based upon this commit: techlgbt/techlgbt@82f135b

Based upon tech.lgbt's customisations of glitch-soc, see techlgbt/techlgbt@82f135b
Copy link

@ShadowJonathan ShadowJonathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just triple checked via irb, and you can actually do the (ENV['...'] || 5).to_i trick directly.

What i was talking about was (ENV['...']&.to_i || 5), since i thought integers do not implement .to_i, but they do.

So the current approach (minus changing &. to . again, since no nil value will bubble up from this) will work.

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.

2 participants