Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default code for rate-limiting with VS/VSR #5732

Open
vepatel opened this issue Jun 11, 2024 · 1 comment
Open

Update default code for rate-limiting with VS/VSR #5732

vepatel opened this issue Jun 11, 2024 · 1 comment
Labels
backlog Pull requests/issues that are backlog items proposal An issue that proposes a feature request

Comments

@vepatel
Copy link
Contributor

vepatel commented Jun 11, 2024

https://docs.nginx.com/nginx-ingress-controller/configuration/policy-resource/#ratelimit, existing default is 503 service unavailable, this needs to be brought in line with ingress implementation with 429 Too Many Requests

func generateLimitReqOptions(rateLimitPol *conf_v1.RateLimit) version2.LimitReqOptions {
	return version2.LimitReqOptions{
		DryRun:     generateBool(rateLimitPol.DryRun, false),
		LogLevel:   generateString(rateLimitPol.LogLevel, "error"),
		RejectCode: generateIntFromPointer(rateLimitPol.RejectCode, 429),
	}
}

<html>
<head><title>429 Too Many Requests</title></head>
<body>
<center><h1>429 Too Many Requests</h1></center>
<hr><center>nginx/1.27.0</center>
</body>
</html>
@vepatel vepatel added the proposal An issue that proposes a feature request label Jun 11, 2024
Copy link

Hi @vepatel thanks for reporting!

Be sure to check out the docs and the Contributing Guidelines while you wait for a human to take a look at this 🙂

Cheers!

@vepatel vepatel added the backlog Pull requests/issues that are backlog items label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Pull requests/issues that are backlog items proposal An issue that proposes a feature request
Projects
Status: Todo ☑
Development

No branches or pull requests

1 participant