chore: Update headers.lua to include interest-cohort in Permissions-Policy header the proper way

This commit modifies the headers.lua file to include the "interest-cohort" directive in the "Permissions-Policy" header. This change ensures that the "interest-cohort" directive is added to the header when the "DISABLE_FLOC" variable is set to "yes". By doing so, the application adheres to the necessary privacy settings and improves the handling of user data.
This commit is contained in:
Théophile Diot 2024-06-25 11:54:29 +01:00
parent 77d322b275
commit a83ea84f50
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -99,7 +99,7 @@ function headers:header()
elseif header == "Permissions-Policy" then
ngx_header[header] = self.variables[variable]
if self.variables["DISABLE_FLOC"] == "yes" then
ngx_header[header] = ngx_header[header] .. "; interest-cohort=()"
ngx_header[header] = ngx_header[header] .. ", interest-cohort=()"
end
else
ngx_header[header] = self.variables[variable]