bcremer / shopware-with-nginx

Running shopware using NGINX
http://shopware.com
BSD 2-Clause "Simplified" License
95 stars 46 forks source link

Remove nested location rules #38

Closed hranicka closed 8 months ago

hranicka commented 6 years ago

Hi @bcremer,

thanks for your nginx configuration for Shopware!

I noticed that some rules don't work, e.g. /themes/Gruntfile.js is accessible via HTTP despite it's restricted.

The reason is there are another rules which are matched instead. This non-regex rule has higher priority than restricting regex one. Once it's matched, another nested rule is processed and file is sent to client before

Moving all the rules out of nested location / solved the problem.

I'm not expert in nginx so I'd ask you before - those nested rules under location / have any special meaning (e.g. performance)?

Thank you! Jaroslav

bcremer commented 5 years ago

HI @hranicka, thanks for this PR. I'm currently not running a Shopware Instance so I have to depend on external testing by the Shopware community to verify this change. If someone from @FriendsOfShopware @shopware has time to test this PR, that would be greatly appreciated.

xf- commented 5 years ago

@bcremer maybe move the repo to @FriendsOfShopware? I think that would be a great place,