Flowpack/varnish

Require newer version of friendsofsymfony/http-cache

Closed this issue · 5 comments

Hi together,

is there a reason, why Version ~1.3 is required for friendsofsymfony/http-cache. ?
That causes us some trouble in one setup, because 1.3 only allows HTTP-Requests for varnish. No https.

In the current version, it seems like the logic has changed. Is there some known incompatibility with a newer version? Or would it be an option to upgrade to a 2.x version?
I'm not so deep into Varnish as to be able to make a judgment.

Thanks for your help!

Hey @Nikdro.

Simply because that was the version available when this package was implemented.

No idea of the specific issue you're referring to with that version not supporting HTTPS requests to Varnish, such a limitation sounds pretty odd to me.

Had a look at v2 vs v1 and don't see much changed, and can't find any mentioning of HTTPS in the new v2 compared to v1. Can you give more details on this issue?

We only use the CacheInvalidator and it's a super simple usage only in https://github.com/mocdk/MOC.Varnish/blob/master/Classes/Service/VarnishBanService.php, so it should be super easy to upgrade as v1 and v2 are very similar. Feel free to try that out yourself and submit a PR if it solves the problem you're having. Doubt there are any incompatibility to look out for here.

Regards,
Aske

Hi Aske,

thanks for the quick reply. In our environment, the Varnish is (for some infrastructure-reasons) running on a second server and only available over HTTPS.

The allowed Schemes for Varnish are defined here: https://github.com/FriendsOfSymfony/FOSHttpCache/blob/1.3.2/src/ProxyClient/Varnish.php#L154-L157
That method is used by the validation here: https://github.com/FriendsOfSymfony/FOSHttpCache/blob/1.3.2/src/ProxyClient/AbstractProxyClient.php#L284-L286
So no HTTPS domain can be used.

At the first look, I can't see such a limitation in the latest version. So it's definitely worth a try.
As soon as I have some time, I will try it out and submit a PR if it is successful.

Thanks for your support, Aske!

Greetings
Niklas

You're welcome. I see, thanks for providing more details.

Yeah think so too, looking forward to it.

Hi,

As I also have a requirement for an updated version (Neos 4.3.5), I started working on an update.
So far it works and I will try to create a merge request in the next days.

Hi everyone,

this problem should be resolved by https://github.com/mocdk/MOC.Varnish/releases/tag/4.0.2