SecureHeaders
- Full name:
\Codefy\Framework\Http\Middleware\SecureHeaders\SecureHeaders - This class is marked as final and can't be subclassed
- This class is a Final class
Properties
compiled
headers
nonces
- This property is static.
config
Methods
__construct
Parameters:
| Parameter | Type | Description |
|---|---|---|
$config | array |
headers
compile
csp
hsts
Strict Transport Security.
expectCT
clearSiteData
Generate Clear-Site-Data header.
permissionsPolicy
miscellaneous
Get Miscellaneous headers.
maxAge
reportUri
Get report-uri directive.
directive
Parse a specific permission policy value.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$config | array |
origins
Get valid origins.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$origins | array |
nonce
Generate random nonce value for the current request.
- This method is static.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$target | string |
Throws:
removeNonce
Remove a specific nonce value or flush all nonces for the given target.
- This method is static.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$target | string|null | |
$nonce | string|null |
Automatically generated on 2025-10-13