Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for disabling auth on filter controllers #1383

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Add doc for disabling auth on filter controllers #1383

merged 1 commit into from
Jun 22, 2021

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Jun 21, 2021

Q A
Branch? 2.0
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR This PR 😃

Ref: https://twitter.com/mbabker/status/1405962888792231939?s=21

App performance can be improved for the /media/cache/resolve/* routes by disabling Symfony's authentication system. Generally, there isn't much of a need to load the authenticated user data here, and for image-heavy applications (like the one that inspired this change) this can free up resources greatly (historically, the liip_imagine_filter controller in our application accounts for 55-60% of the total transaction time for our web frontend, after deployment this dropped down to 40-45%).

(RST isn't really a strong-suit for me, so I'm hoping I've got the format here generally right)

@dbu
Copy link
Member

dbu commented Jun 22, 2021

that looks great, thanks for the research and the pull request!

@coveralls
Copy link

coveralls commented Jun 22, 2021

Coverage Status

Coverage remained the same at 84.066% when pulling ea74b09 on mbabker:patch-1 into 7a1779b on liip:2.x.

@dbu dbu merged commit 5e57712 into liip:2.x Jun 22, 2021
@mbabker mbabker deleted the patch-1 branch June 22, 2021 14:11
lchrusciel added a commit to Sylius/Sylius-Standard that referenced this pull request Jun 26, 2021
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
-------

d70977b Disable auth for LiipImagineBundle controllers
windragon0910 added a commit to windragon0910/symfony_ecom_framework that referenced this pull request Oct 25, 2023
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants