From ffd8df879dea5b306b1a1615c2eabe0d463a3a3b Mon Sep 17 00:00:00 2001
From: Laurent Bercot
Date: Fri, 27 Oct 2023 14:33:26 +0000
Subject: custom-headers revamp, can be removed now
Signed-off-by: Laurent Bercot
---
doc/tipidee.conf.html | 26 ++++++++++++++++++--------
1 file changed, 18 insertions(+), 8 deletions(-)
(limited to 'doc/tipidee.conf.html')
diff --git a/doc/tipidee.conf.html b/doc/tipidee.conf.html
index 7ead60f..685b454 100644
--- a/doc/tipidee.conf.html
+++ b/doc/tipidee.conf.html
@@ -448,21 +448,31 @@ serving files with uncommon extensions or have specific needs.
custom-header is global directive, introduced by the
keyword custom-header. It allows
the user to define custom headers that are to be added to every response.
+It takes a subcommand, that is used to define what should be done with
+the header:
- custom-header option key value
+ custom-header add name value
+ custom-header always name value
+ custom-header remove name
+ custom-header never name
- - option is weak or strong, and determines what happens when a CGI script
-provides a header with the same name. If weak, the CGI value has precedence; if strong,
-value has precedence.
- - key is the name of the custom header, such as Content-Security-Policy or X-Tacky-Header.
-It is case-insensitive; its spelling will be canonicalized when processed.
- - value is the content of the header. Any whitespace given in value will all register as a single space.
+ - custom-header add tells tipidee to add a header named name
+with the value value to all its answers. A CGI script can override value
+by providing its own name header.
+ - custom-header always is like custom-header add, except a CGI script
+cannot override value, which will always be used.
+ - custom-header remove tells tipidee to not provide a name
+header. This is only useful for a few overridable headers that tipidee provides by default,
+such as Content-Security-Policy or Referrer-Policy. If a CGI script
+provides such a header, the CGI header will be used despite the directive.
+ - custom-header never is like custom-header remove, except even a
+CGI script cannot provide a name header, which will be stripped from its output.
- Some headers cannot be customized. tipidee-config
-will reject an attempt to define a Connection or a Date header, for instance.
+will reject an attempt to add, or remove, a Connection header, for instance.
--
cgit v1.2.3