Check the correct header for the strictTransportPolicy property

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security
This commit is contained in:
Murray Christopherson 2023-09-13 19:29:58 -07:00 committed by GitHub
parent ad57aaa7f8
commit 09e5b5d888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ const handler = async (url) => {
const response = await axios.get(fullUrl); const response = await axios.get(fullUrl);
const headers = response.headers; const headers = response.headers;
return { return {
strictTransportPolicy: headers['strict-transport-policy'] ? true : false, strictTransportPolicy: headers['strict-transport-security'] ? true : false,
xFrameOptions: headers['x-frame-options'] ? true : false, xFrameOptions: headers['x-frame-options'] ? true : false,
xContentTypeOptions: headers['x-content-type-options'] ? true : false, xContentTypeOptions: headers['x-content-type-options'] ? true : false,
xXSSProtection: headers['x-xss-protection'] ? true : false, xXSSProtection: headers['x-xss-protection'] ? true : false,