Closed wbob closed 5 years ago
HI @wbob, 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.
I will test this tomorrow :) I had this situation already often in Development Support, and we suggested the users to set A alternative Proxy Url to the shopware.php and it solved it.
Thanks @shyim for stepping in :+1:
@bcremer tested looks good for me :)
@wbob Thanks for this PR. @shyim Thanks for testing.
Merged it right away.
thanks for looking into it. Btw, nice to have shopware/shopware#1908 in >= 5.5.5 :+1: A schema redirect will be less likely if no proxyurl is configured explicitly.
Nginx won't handle BAN (or POST) on static resources and return a
405 Method Not Allowed
. In general, invalidation still works withinvalidateWithStore()
, but not viainvalidateWithBANRequest()
. Seeinvalidate()
in the HttpCache Plugin when each is used.Users will see a
Reverse proxy returned invalid status code
in their logs.To forward the invalidation to PHP, a redirect to shopware.php is used, ending up being handled by fastcgi. According to if-is-evil, the use of
rewrite .. last
withinif
is declared "100% safe".last
will stop rewrite processing within the block and search for a new matching location, being\.php$
.PHP will handle the request and Nginx will return a 200
Invalidation now resets Age, prompts cache to re-fetch
the example dump in the head of shopware.php verifies the internal nginx rewrite will not alter the method
Will very likely solve these issues: forum.shopware.com#35300 forum.shopware.com#51742 forum.shopware.com#56593 forum.shopware.com#56445
I commented extensively to avoid configuration errors, if you prefer to have it terse I'll remove the bullet points.