mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 11:24:40 +02:00
Added some basic security configuration with NelmioSecurityBundle.
This commit is contained in:
parent
59d1349ce8
commit
581dcae2ef
5 changed files with 232 additions and 1 deletions
|
@ -25,4 +25,5 @@ return [
|
|||
Translation\Bundle\TranslationBundle::class => ['all' => true],
|
||||
Symplify\ParameterNameGuard\ParameterNameGuardBundle::class => ['dev' => true, 'test' => true],
|
||||
Florianv\SwapBundle\FlorianvSwapBundle::class => ['all' => true],
|
||||
Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true],
|
||||
];
|
||||
|
|
31
config/packages/nelmio_security.yaml
Normal file
31
config/packages/nelmio_security.yaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
nelmio_security:
|
||||
# prevents framing of the entire site
|
||||
clickjacking:
|
||||
paths:
|
||||
'^/.*': SAMEORIGIN
|
||||
|
||||
# disables content type sniffing for script resources
|
||||
content_type:
|
||||
nosniff: true
|
||||
|
||||
# prevents redirections outside the website's domain
|
||||
external_redirects:
|
||||
abort: true
|
||||
log: true
|
||||
|
||||
# forces Microsoft's XSS-Protection with
|
||||
# its block mode
|
||||
xss_protection:
|
||||
enabled: true
|
||||
mode_block: true
|
||||
|
||||
# Send a full URL in the `Referer` header when performing a same-origin request,
|
||||
# only send the origin of the document to secure destination (HTTPS->HTTPS),
|
||||
# and send no header to a less secure destination (HTTPS->HTTP).
|
||||
# If `strict-origin-when-cross-origin` is not supported, use `no-referrer` policy,
|
||||
# no referrer information is sent along with requests.
|
||||
referrer_policy:
|
||||
enabled: true
|
||||
policies:
|
||||
- 'no-referrer'
|
||||
- 'strict-origin-when-cross-origin'
|
Loading…
Add table
Add a link
Reference in a new issue