Skip to content

Commit

Permalink
feature #580 Disable auth for LiipImagineBundle controllers (mbabker)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.10 branch.

Discussion
----------

Ref: https://twitter.com/mbabker/status/1405962888792231939?s=21 and liip/LiipImagineBundle#1383

Most apps don't need authenticated user info when resolving images, so we can sanely disable the security authentication for these routes.

Commits
-------

d70977b9497398d7eee184a5f1fdeb557406c06a Disable auth for LiipImagineBundle controllers
  • Loading branch information
windragon0910 committed Jun 26, 2021
2 parents 4cba2ff + 1296290 commit 99b7b27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

image_resolver:
pattern: ^/media/cache/resolve
security: false

access_control:
- { path: "%sylius.security.admin_regex%/_partial", role: IS_AUTHENTICATED_ANONYMOUSLY, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
Expand Down

0 comments on commit 99b7b27

Please sign in to comment.