]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
doc: rework mod-cookies examples
authorDaniel Salzman <daniel.salzman@nic.cz>
Tue, 2 Sep 2025 14:02:13 +0000 (16:02 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Fri, 5 Sep 2025 08:07:35 +0000 (10:07 +0200)
src/knot/modules/cookies/cookies.rst

index c767a25e9f7ef44f9d4ed8980576b13a83e4f604..94af8413313c46fc012c43f8c598e3ccb5b1ea34 100644 (file)
@@ -25,29 +25,20 @@ It is recommended to enable DNS Cookies globally, not per zone. The module may b
 
     template:
         - id: default
-          global-module: mod-cookies # Enable DNS Cookies globally
+          global-module: mod-cookies  # Enable DNS Cookies globally with defaults
 
 Module configuration may be supplied if necessary.
 
 ::
 
     mod-cookies:
-      - id: default
-        secret-lifetime: 30h # The Server Secret is regenerated every 30 hours
-        badcookie-slip: 3    # The server replies only to every third query with a wrong cookie
+      - id: custom
+        badcookie-slip: 3  # The server replies only to every third query with a wrong cookie
+        secret: 0xdeadbeefdeadbeefdeadbeefdeadbeef  # Explicit Server Secret
 
     template:
       - id: default
-        global-module: mod-cookies/default # Enable DNS Cookies globally
-
-The value of the Server Secret may also be managed manually using the :ref:`mod-cookies_secret` option. In this case
-the server does not automatically regenerate the Server Secret.
-
-::
-
-    mod-cookies:
-        - id: default
-          secret: 0xdeadbeefdeadbeefdeadbeefdeadbeef
+        global-module: mod-cookies/custom  # Enable DNS Cookies globally with custom settings
 
 Module reference
 ----------------