-
Notifications
You must be signed in to change notification settings - Fork 47
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
Allow to set a timeout for searches #445
Conversation
bbd7d4c
to
9eab811
Compare
If supported by the chosen router, it will stop expanding its search interval after the given timeout.
If you want to prevent a malicious user from using CPU resources, this won't be sufficient, because this only "protects" the intermodal API, not the routing API. Make sure to have a whitelist of API endpoints (that doesn't contain the |
Thanks for the hints. I may add similar things for more endpoints in the future, but for now I'll only allow tested ones. Right now I am still worried less about malicious users, but more about well-intending ones causing long running tasks by accident. |
Is there still anything that needs to be done on this? |
The CI build is all red, so there seem to be errors in the code. |
The CI builds against nigiri without my changes I think, so that's to be expected |
If supported by the chosen router, it will stop expanding its search interval after the given timeout.
Depends on motis-project/nigiri#68
Workarounds #443 enough to not be a blocker for public hosting.
Let me know if this is generally something you want, and if I should change anything about the implementation.