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

Add checks to see if stream endpoints exist before calling them #174

Merged

Conversation

dhurley
Copy link
Contributor

@dhurley dhurley commented Oct 5, 2023

Proposed changes

This changes is required for the use case where someone doesn't have streams configured in their nginx.conf and want to prevent 404 errors from being logged in the NGINX access log.

127.0.0.1 - - [05/Oct/2023:13:10:29 +0000] "GET /api//8/stream/upstreams HTTP/1.1" 404 183 "-" "Go-http-client/1.1" "-"
127.0.0.1 - - [05/Oct/2023:13:10:29 +0000] "GET /api//8/stream/zone_sync HTTP/1.1" 404 183 "-" "Go-http-client/1.1" "-"
127.0.0.1 - - [05/Oct/2023:13:10:29 +0000] "GET /api//8/stream/limit_conns HTTP/1.1" 404 183 "-" "Go-http-client/1.1" "-"
127.0.0.1 - - [05/Oct/2023:13:10:44 +0000] "GET /api//8/stream/server_zones HTTP/1.1" 404 183 "-" "Go-http-client/1.1" "-"

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@dhurley dhurley requested a review from a team as a code owner October 5, 2023 16:09
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Oct 5, 2023
@oliveromahony
Copy link
Contributor

Please add sufficient tests and the log entries which led to these changes

client/nginx.go Outdated Show resolved Hide resolved
client/nginx.go Outdated Show resolved Hide resolved
@vepatel vepatel requested a review from jjngx October 6, 2023 12:56
@ciarams87 ciarams87 merged commit df96e6b into nginxinc:main Oct 6, 2023
12 checks passed
@lucacome lucacome added the enhancement Pull requests for new features/feature enhancements label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants