{ "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" },
};
for (const auto& h : 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
You can override those headers, or add custom headers by using the last parameter to :func:`webserver`.
For example, to remove the X-Frame-Options header and add a X-Custom one:
HTTP/1.1 200 OK
Transfer-Encoding: chunked
+ Connection: close
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'
Content-Type: application/json
X-Content-Type-Options: nosniff
HTTP/1.1 200 OK
Transfer-Encoding: chunked
+ Connection: close
Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'
Content-Type: application/json
X-Content-Type-Options: nosniff