Skip to content

Commit f016e55

Browse files
authored
Merge pull request #489 from dotkernel/issue-487
Issue #487: Added security headers
2 parents e24aaf4 + 99d6e00 commit f016e55

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

config/autoload/response-header.global.php

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,42 @@
88
* Global headers - applied to all routes
99
*/
1010
'*' => [
11-
'permissions-policy' => [
11+
'permissions-policy' => [
1212
'value' => 'interest-cohort=()',
1313
'overwrite' => true,
1414
],
15+
'X-Content-Type-Options' => [
16+
'value' => 'nosniff',
17+
'overwrite' => true,
18+
],
19+
'Referrer-Policy' => [
20+
'value' => 'no-referrer',
21+
'overwrite' => true,
22+
],
1523
],
1624

1725
/**
1826
* Route-specific headers
1927
*/
20-
// 'route-name' => [
21-
// 'header-name' => [
22-
// 'value' => 'header-value',
23-
// 'overwrite' => true,
24-
// ]
25-
// ],
28+
'security::generate-token' => [
29+
'Cache-Control' => [
30+
'value' => 'no-store',
31+
'overwrite' => true,
32+
],
33+
'Pragma' => [
34+
'value' => 'no-cache',
35+
'overwrite' => true,
36+
],
37+
],
38+
'security::refresh-token' => [
39+
'Cache-Control' => [
40+
'value' => 'no-store',
41+
'overwrite' => true,
42+
],
43+
'Pragma' => [
44+
'value' => 'no-cache',
45+
'overwrite' => true,
46+
],
47+
],
2648
],
2749
];

0 commit comments

Comments
 (0)