@gradientedge/cdk-utils 9.70.0 → 9.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -337,8 +337,8 @@ class AzureApiManagementManager {
|
|
|
337
337
|
}
|
|
338
338
|
// Inject rate limiting policy (if configured)
|
|
339
339
|
let rateLimitPolicy = '';
|
|
340
|
-
if (props.rateLimit) {
|
|
341
|
-
rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}"/>`;
|
|
340
|
+
if (props.rateLimit && scope.props.subscriptionId) {
|
|
341
|
+
rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}" counter-key="${scope.props.subscriptionId}"/>`;
|
|
342
342
|
}
|
|
343
343
|
const policyXmlContent = `<policies>
|
|
344
344
|
<inbound>
|
package/package.json
CHANGED
|
@@ -402,8 +402,8 @@ export class AzureApiManagementManager {
|
|
|
402
402
|
|
|
403
403
|
// Inject rate limiting policy (if configured)
|
|
404
404
|
let rateLimitPolicy = ''
|
|
405
|
-
if (props.rateLimit) {
|
|
406
|
-
rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}"/>`
|
|
405
|
+
if (props.rateLimit && scope.props.subscriptionId) {
|
|
406
|
+
rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}" counter-key="${scope.props.subscriptionId}"/>`
|
|
407
407
|
}
|
|
408
408
|
const policyXmlContent = `<policies>
|
|
409
409
|
<inbound>
|