## **User description**
<!-- Provide a general summary of your changes in the Title above -->
## Description
<!-- Describe your changes in detail -->
## Related Issue
<!-- This project only accepts pull requests related to open issues. -->
<!-- If suggesting a new feature or change, please discuss it in an
issue first. -->
<!-- If fixing a bug, there should be an issue describing it with steps
to reproduce. -->
<!-- OSS: Please link to the issue here. Tyk: please create/link the
JIRA ticket. -->
## Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
## How This Has Been Tested
<!-- Please describe in detail how you tested your changes -->
<!-- Include details of your testing environment, and the tests -->
<!-- you ran to see how your change affects other areas of the code,
etc. -->
<!-- This information is helpful for reviewers and QA. -->
## Screenshots (if appropriate)
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Refactoring or add test (improvements in base code or adds test
coverage to functionality)
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply -->
<!-- If there are no documentation updates required, mark the item as
checked. -->
<!-- Raise up any additional concerns not covered by the checklist. -->
- [ ] I ensured that the documentation is up to date
- [ ] I explained why this PR updates go.mod in detail with reasoning
why it's required
- [ ] I would like a code coverage CI quality gate exception and have
explained why
___
## **Type**
Bug fix
___
## **Description**
- Fixed an issue where the global rate limit disabled flag was not
properly checked, causing the rate limiter to be incorrectly enabled.
___
## **Changes walkthrough**
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
<td>
<details>
<summary><strong>mw_api_rate_limit.go</strong><dd><code>Fix Global Rate
Limit Disabled Flag Check</code>
</dd></summary>
<hr>
gateway/mw_api_rate_limit.go
<li>Added a condition to check <code>GlobalRateLimit.Disabled</code>
flag in <br><code>EnabledForSpec</code> function.<br>
</details>
</td>
<td><a
href="https://github.com/TykTechnologies/tyk/pull/6120/files#diff-46326b04f936c839922e970db5c2924156cc797070948f3dc9c589d04661d6d2">+1/-1</a>
</td>
</tr>
</table></td></tr></tr></tbody></table>
___
> ✨ **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools
and their descriptions
(cherry picked from commit 53886d0)
User description
TT-11485, fix for global rate limit disabled flag not working (#6120)
User description
Description
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
functionality to change)
coverage to functionality)
Checklist
why it's required
explained why
Type
Bug fix
Description
properly checked, causing the rate limiter to be incorrectly enabled.
Changes walkthrough
mw_api_rate_limit.go
Fix Global Rate Limit Disabled Flag Checkgateway/mw_api_rate_limit.go
GlobalRateLimit.Disabledflag inEnabledForSpecfunction.Type
Bug fix, Tests
Description
EnabledForSpecfunction.EnabledForSpecfunction respects theGlobalRateLimit.Disabledflag.Changes walkthrough
mw_api_rate_limit.go
Fix Global Rate Limit Disabled Flag Checkgateway/mw_api_rate_limit.go
GlobalRateLimit.Disabledis true in theEnabledForSpecfunction.mw_api_rate_limit_test.go
Add Test for Global Rate Limit Disabled Flaggateway/mw_api_rate_limit_test.go
apidefandassertpackages for testing.TestRateLimitForAPI_EnabledForSpecto verify thecorrect behavior of the
EnabledForSpecfunction when the global ratelimit is disabled.