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

dnsdist: default set "Connection: close" header for web requests #6711

merged 2 commits into from Jun 6, 2018


None yet
2 participants

chbruyand commented Jun 5, 2018

Short description

Default add the Connection: close header to dnsdist http responses to indicate that the connection will be closed after completion of the response.

Fix #6532


I have:

  • read the document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@chbruyand chbruyand added this to the dnsdist-1.3.x milestone Jun 5, 2018

@@ -194,6 +194,7 @@ static void addSecurityHeaders(YaHTTP::Response& resp, const boost::optional<std
{ "X-Permitted-Cross-Domain-Policies", "none" },
{ "X-XSS-Protection", "1; mode=block" },
{ "Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'" },
{ "Connection", "close" },

This comment has been minimized.


rgacogne Jun 5, 2018


The name of the function (addSecurityHeaders) might not be relevant anymore after that change.

@@ -21,6 +21,7 @@ By default, our web server sends some security-related headers::
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'
Connection: close

This comment has been minimized.


rgacogne Jun 5, 2018


I don't think Connection: close belongs here, it's not a security-related header at all.


This comment has been minimized.


chbruyand commented Jun 6, 2018

Sorry, didn't pay attention to the name of the function. I did move setting the header where it cannot be overriden as we will always close the connection.

@rgacogne rgacogne merged commit 59de6da into PowerDNS:master Jun 6, 2018

4 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
lgtm analysis: C/C++ No alert changes
lgtm analysis: JavaScript No alert changes
lgtm analysis: Python No alert changes

@chbruyand chbruyand deleted the chbruyand:dnsdist-connection-close branch Dec 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment