Skip to content

Commit a0e2f33

Browse files
committed
updates OWASP headers
1 parent 97a55af commit a0e2f33

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ The full list of OWASP Secure Headers you can set are:
980980
- xContentTypeOptions - X-Content-Type-Options,
981981
- xFrameOptions - X-Frame-Options,
982982
- xPermittedCrossDomainPolicies - X-Permitted-Cross-Domain-Policies
983+
- xDNSPrefetchControl - X-DNS-Prefetch-Control
983984

984985
You should note that `Pragma` has been [deprecated by owasp](https://owasp.org/www-project-secure-headers/#pragma), this plugin will issue a warning when you are still using Pragma and might drop support.
985986

json/owasp.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"last_update_utc": "2024-09-19 21:29:28",
2+
"last_update_utc": "2025-08-17 15:23:47",
33
"headers": [
44
{
55
"name": "Cache-Control",
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"name": "Content-Security-Policy",
14-
"value": "default-src 'self'; form-action 'self'; object-src 'none'; frame-ancestors 'none'; upgrade-insecure-requests; block-all-mixed-content"
14+
"value": "default-src 'self'; form-action 'self'; base-uri 'self'; object-src 'none'; frame-ancestors 'none'; upgrade-insecure-requests"
1515
},
1616
{
1717
"name": "Cross-Origin-Embedder-Policy",
@@ -41,6 +41,10 @@
4141
"name": "X-Content-Type-Options",
4242
"value": "nosniff"
4343
},
44+
{
45+
"name": "X-DNS-Prefetch-Control",
46+
"value": "off"
47+
},
4448
{
4549
"name": "X-Frame-Options",
4650
"value": "deny"

src/owasp.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ class OWASP {
6767
description:
6868
"A cross-domain policy file is an XML document that grants a web client, such as Adobe Flash Player or Adobe Acrobat (though not necessarily limited to these), permission to handle data across domains. When clients request content hosted on a particular source domain and that content makes requests directed towards a domain other than its own, the remote domain needs to host a cross-domain policy file that grants access to the source domain, allowing the client to continue the transaction. Normally a meta-policy is declared in the master policy file, but for those who can't write to the root directory, they can also declare a meta-policy using the X-Permitted-Cross-Domain-Policies HTTP response header. - [OWASP Link](https://owasp.org/www-project-secure-headers/#x-permitted-cross-domain-policies)",
6969
},
70+
"X-DNS-Prefetch-Control": {
71+
description:
72+
"The HTTP X-DNS-Prefetch-Control response header controls DNS prefetching, a feature by which browsers proactively perform domain name resolution on links that the user may choose to follow as well as URLs for items referenced by the document, including images, CSS, JavaScript, and so forth. - [MDN Link](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-DNS-Prefetch-Control)",
73+
},
7074
};
7175

7276
this.headerMap = {
@@ -83,6 +87,7 @@ class OWASP {
8387
xContentTypeOptions: "X-Content-Type-Options",
8488
xFrameOptions: "X-Frame-Options",
8589
xPermittedCrossDomainPolicies: "X-Permitted-Cross-Domain-Policies",
90+
xDNSPrefetchControl: "X-DNS-Prefetch-Control",
8691
};
8792
}
8893

0 commit comments

Comments
 (0)