Skip to content

Commit ea75df8

Browse files
Update security.yaml
1 parent d068087 commit ea75df8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

symfony/security-bundle/7.3/config/packages/security.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ security:
66
providers:
77
users_in_memory: { memory: null }
88
firewalls:
9-
dev: # Exception for the web debug toolbar and assets (only needed if you have a broad `access_control`):
10-
pattern: ^/(_profiler|_wdt|assets|build)/ # `assets` is for AssetMapper; `build` is for Webpack Encore. Regex delimiters `{}` are added automatically.
9+
# Disable security for dev tools and static assets (only needed if access_control is broad)
10+
dev:
11+
# 'assets/' is for AssetMapper, 'build/' for Webpack Encore
12+
# (note: no regex delimiters needed; Symfony adds `{}` automatically)
13+
pattern: ^/(_profiler|_wdt|assets|build)/
1114
security: false
1215
main:
1316
lazy: true
@@ -28,10 +31,8 @@ security:
2831
when@test:
2932
security:
3033
password_hashers:
31-
# By default, password hashers are resource intensive and take time. This is
32-
# important to generate secure password hashes. In tests however, secure hashes
33-
# are not important, waste resources and increase test times. The following
34-
# reduces the work factor to the lowest possible values.
34+
# Password hashers are resource-intensive by design to ensure security.
35+
# In tests, it's safe to reduce their cost to improve performance.
3536
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
3637
algorithm: auto
3738
cost: 4 # Lowest possible value for bcrypt

0 commit comments

Comments
 (0)