Retrieve Rate Limit Headers with forge/bridge's requestJira

I am working on a forge app and try to implement robust handling of rate limiting 429s (as described here: https://developer.atlassian.com/cloud/jira/platform/rate-limiting/).
I am hitting the bulkfetch endpoint with @forge/bridge’s requestJira. In the network tab I also see the headers (e.g. x-beta-ratelimit-remaining), but when I try to read it from the response in my app’s code it is always null.
After reading up on it, I realized it’s probably a CORS issue, so I installed an extension to get around it and this actually works.
But how can I get this to run by default? Do I have to add something to my requestJira call? Or is this just not possible? If so, how am I supposed to implement this?

Cheers, Martin

7 Likes

Related bug report: FRGE-1923.

@KelseyVanScoy Could you please coordinate with the relevant team to have the new headers whitelisted in the Forge bridge? Otherwise, it won’t be possible for some Forge apps to implement the recommended rate limit handling. Thank you!

3 Likes