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

don't generate a 404 from Shopware for missing images #1461

Open
jonashrem opened this issue Aug 26, 2024 · 7 comments
Open

don't generate a 404 from Shopware for missing images #1461

jonashrem opened this issue Aug 26, 2024 · 7 comments
Labels
Improvement PR created to append/modify info in the existing article Undocumented Feature Feature which is not documented yet and is considered for documentation

Comments

@jonashrem
Copy link
Contributor

PHP Version

/

Shopware Version

6.6

Affected area / extension

Platform(Default)

Expected behaviour

On a missing media file in media or themes folder, shopware should not be instancieted at all

Actual behaviour

At the moment, for every request resulting in a 404 from the web server, the Shopware index.php is called by .htaccess or nginx configuration.

This can create a negative performance impact, when clients try to access non-existing files like missing images or ico files.

For performance reasons, I suggest adding an option, to remove the media fallback completely ( in the installer for example )

How to reproduce

call a non existent media file ( you'll see a 404 Shopware page )

@shopwareBot
Copy link

[public] Shopware automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/NEXT-38057.

This link is only intended for Shopware employees and for internal use only.

[created from NEXT-38057, comment 490378]

@shyim
Copy link
Member

shyim commented Aug 27, 2024

In the Caddy config, we have

@default {
    not path /theme/* /media/* /thumbnail/* /bundles/* /css/* /fonts/* /js/* /recovery/* /sitemap/*
  }

I think we could adopt this to Nginx (idk what you are using)

@jonashrem
Copy link
Contributor Author

we have customers with apache or nginx,

do you want me to write a PR?

@shyim
Copy link
Member

shyim commented Aug 28, 2024

would be nice if you could adjust the documentation, I think you know more what you do there :)

@shyim shyim transferred this issue from shopware/shopware Aug 28, 2024
@bojanrajh bojanrajh added Undocumented Feature Feature which is not documented yet and is considered for documentation Improvement PR created to append/modify info in the existing article labels Aug 29, 2024
@jonashrem
Copy link
Contributor Author

NGINX: #1480

@jonashrem
Copy link
Contributor Author

Apache: #4730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement PR created to append/modify info in the existing article Undocumented Feature Feature which is not documented yet and is considered for documentation
Projects
None yet
Development

No branches or pull requests

5 participants
@jonashrem @shopwareBot @shyim @bojanrajh and others