]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Update dns-over-https.rst
authorTimothy Pillow <oregonpillow@gmail.com>
Mon, 4 Nov 2024 12:26:54 +0000 (13:26 +0100)
committerGitHub <noreply@github.com>
Mon, 4 Nov 2024 12:26:54 +0000 (13:26 +0100)
pdns/dnsdistdist/docs/guides/dns-over-https.rst

index 9d3ecdf40173437942d4d7f9c97e3f2266d4f4fd..d45ebc58bbd34e4d9f0530ee5ad8d5851ca13bf0 100644 (file)
@@ -74,7 +74,26 @@ preferred library for incoming DoH support, because ``h2o`` has unfortunately re
 (see https://github.com/h2o/h2o/issues/3230). While we took great care to make the migration as painless as possible, ``h2o`` supported HTTP/1 while ``nghttp2``
 does not. This is not an issue for actual DNS over HTTPS clients that support HTTP/2, but might be one in setups running dnsdist behind a reverse-proxy that
 does not support HTTP/2, like nginx. We do not plan on implementing HTTP/1, and recommend using HTTP/2 between the reverse-proxy and dnsdist for performance reasons.
-For nginx in particular, a possible work-around is to use the `grpc_pass <http://nginx.org/r/grpc_pass>`_ directive as suggested in their `bug tracker <https://trac.nginx.org/nginx/ticket/1875>`_.
+
+For nginx in particular, a possible work-around is to use the `grpc_pass <http://nginx.org/r/grpc_pass>`_ directive as suggested in their `bug tracker <https://trac.nginx.org/nginx/ticket/1875>`_ e.g.::
+
+  location /dns-query {
+    include /config/nginx/proxy.conf;
+    include /config/nginx/resolver.conf;
+    set $upstream_app dnsdist;
+    set $upstream_port 443;
+    set $upstream_proto grpc;
+    grpc_pass grpcs://$upstream_app:$upstream_port;
+
+    proxy_set_header Host $host;
+    proxy_set_header X-Real-IP $remote_addr;
+    proxy_set_header X-Forwarded-Host $host;
+    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    proxy_set_header X-Forwarded-Proto $scheme;
+    proxy_set_header X-Forwarded-Protocol $scheme;
+    proxy_set_header Range $http_range;
+    proxy_set_header If-Range $http_if_range;
+  }
 
 Internal design
 ^^^^^^^^^^^^^^^