Add checkup test about Google's Floc

This commit is contained in:
yflory 2021-05-07 14:23:15 +02:00
parent 85cb36ad97
commit 7a682397e2
2 changed files with 10 additions and 0 deletions

View File

@ -48,6 +48,7 @@ Default.httpHeaders = function () {
"X-XSS-Protection": "1; mode=block",
"X-Content-Type-Options": "nosniff",
"Access-Control-Allow-Origin": "*",
"Permissions-policy":"interest-cohort=()"
};
};
Default.mainPages = function () {

View File

@ -365,6 +365,15 @@ define([
});
});
assert(function (cb, msg) {
msg.innerText = "Missing HTTP header required to disable Google's Floc.";
$.ajax('/?'+ (+new Date()), {
complete: function (xhr) {
cb(xhr.getResponseHeader('permissions-policy') === 'interest-cohort=()');
},
});
});
assert(function (cb, msg) {
msg = msg;
return void cb(true);