Return polling interval for frontend on endpoints with polling
Description
As per https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9998 we have to start returning Poll-Interval
header for endpoints that are polled by the frontend.
Proposal
- Introduce
base_polling_interval
to application settings. The value is specified in milliseconds, -1 means that polling is disabled. - In
Gitlab::EtagCatching::Middleware
returnHTTP 429 Too Many Requests
if polling is disabled - motivation - Implement a module that sets
Poll-Interval
header and can be reused by endpoints that involve polling. The returned value should usebase_polling_interval
from application settings, but can multiply this value by a custom modifier. Value -1 should always be preserved.