Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CmdrSharp's avatar

API Rate Limiting

Hey! I'm currently looking over options at ratelimiting the Spark API (the documentation seems to miss mentioning this). Using the throttle middleware seemed like a fine bet, but unfortunately it also throttles the internal use of the API (Vue usage) which makes life difficult.

Has anyone run into this already or figured out a way to exclude the internal usage of the API from being throttled?

Cheers!

0 likes
4 replies
CmdrSharp's avatar

Let's pray that it works, and tag @TaylorOtwell in here. Maybe the gods are on our side today and he appears, sharing magic wisdom.

d3xt3r's avatar

Extend the class => change the signature, create a middleware, apply on internal routes ???

CmdrSharp's avatar

That's definitely an option and the only solution I've come across so far. At the same time, it feels like this kind of functionality would be included and that I'm missing it. Considering how Spark is API-centric for its Vue-implementation, I can imagine there could be a simpler solution.

Please or to participate in this conversation.