Rate Limiting Header

In rate limiting I have used the option JSON response. But how can i add additional headers that are related to Cross-Origin Resource Sharing (CORS)

header("Access-Control-Allow-Credentials: true");
header("Access-Control-Allow-Origin: https://subdomain.example.com");

This is required for my UI to display notification from the json.

{
    "success": false,
    "message": "You have been rate limited. Please try again later."
}

I have found the solution. In Transform Rules, we can Modify the Response Header. Just copy the expression from Rate Limiting to the Modify Response Header and set the headers we wanted.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.