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

Custom RateLimit setting #39

Closed
C9Glax opened this issue Jan 31, 2024 · 5 comments · Fixed by #41
Closed

Custom RateLimit setting #39

C9Glax opened this issue Jan 31, 2024 · 5 comments · Fixed by #41
Assignees

Comments

@C9Glax
Copy link
Owner

C9Glax commented Jan 31, 2024

@db-2001 Hey do you have any ideas on how to design this?
C9Glax/tranga#109

Right now requestLimits (apart from MangaDex which is very strict) use byte 1 and a value of 1 request per second.
API is already done.
Already did the UserAgent as that was Straightforward enough, but am kinda stumped on how I want to do this.

@db-2001
Copy link
Collaborator

db-2001 commented Feb 1, 2024

I'm a little bit lost on what youre asking. Are you asking do I have a way to design the front end to allow for custom user agents and rate limits per site? Or how to actually implement the rate limiting? For the former, yes I have an idea. I wanted to put all the connectors in a section on the settings page so that eventually when global search is enabled, you could disable connectors you didn't want to search, these settings could just go there. For the latter, I don't have any offhand knowledge about rate limiting but I could look into it?

Could you also clarify what you mean by requestType in the API? I'm not sure what/how the byte 1 you mentioned is being used.

@C9Glax
Copy link
Owner Author

C9Glax commented Feb 1, 2024

Oh I was asking about the design yes.
The API is already done and (hopefully) working, it's just a frontend thing.
The global search thing sounds cool and putting in the ratelimits there sounds like a good idea 👍🏼

Could you also clarify what you mean by requestType in the API? I'm not sure what/how the byte 1 you mentioned is being used.

I was trying to explain how it works at the moment. Different requesttypes (e.g. a website, an author-information, an image) have different bytevalues. I think only Mangadex has that though and all others just use a bytevalue of 1. thats what i meant

@db-2001
Copy link
Collaborator

db-2001 commented Feb 1, 2024

Ah okay, I think I get it. I'll try and mock up something and put in a pull request sometime this weekend. Couple questions, does the bytevalue need to be handled on the front-end side? If so what do the different bytevalue for MDex correspond to? Second question, should the global search be implemented on the front-end side or server side, I can do it pretty easily on the front end side but, I feel like storing which connectors are enabled/disabled should be handled by the API.

@C9Glax
Copy link
Owner Author

C9Glax commented Feb 1, 2024

Couple questions, does the bytevalue need to be handled on the front-end side

Kind of, if you want to configure a specific request rate limit then yes. The bytevalues are in every constrcutor, for example here.

I feel like storing which connectors are enabled/disabled should be handled by the API.

Yea this would also fall in line with disabling connectors if chrome fails.

So I guess should be implemented on api side...

@db-2001
Copy link
Collaborator

db-2001 commented Feb 9, 2024

Can you add GET API calls so I can populate the value of the textbox with the saved rate limit. Adding Logs to those functions so it's easy to check what the rate limit has been updated to from the logs would be nice as well, if possible.

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 a pull request may close this issue.

2 participants