Skip to content

Commit 32ca70c

Browse files
committed
docs: add how to customize SecureHeaders
1 parent e943b69 commit 32ca70c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

user_guide_src/source/incoming/filters.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,17 @@ Provided Filters
196196
The filters bundled with CodeIgniter4 are: ``Honeypot``, ``CSRF``, ``InvalidChars``, ``SecureHeaders``, and ``DebugToolbar``.
197197

198198
.. note:: The filters are executed in the order defined in the config file. However, if enabled, ``DebugToolbar`` is always executed last because it should be able to capture everything that happens in the other filters.
199+
200+
SecureHeaders
201+
=============
202+
203+
This filter adds HTTP response headers that your application can use to increase the security of your application.
204+
205+
If you want to customize the headers, extend ``CodeIgniter\Filters\SecureHeaders`` and override the ``$headers`` property. And change the ``$aliases`` property in **app/Config/Filters.php**::
206+
207+
public $aliases = [
208+
...
209+
'secureheaders' => \App\Filters\SecureHeaders::class,
210+
];
211+
212+
If you want to know about secure headers, see `OWASP Secure Headers Project <https://owasp.org/www-project-secure-headers/>`_.

0 commit comments

Comments
 (0)