The problem is that while you are sure your cert is self-signed and okay, it’s difficult to make a sweeping generalization like that for everyone.
If you are requesting HTTPS and know that the site is self-signed or is invalided and are reasonably sure that it can be trusted, then set to false.
I don’t know that for the majority of users (can’t know it either, and users don’t always know). You should never perform an unsecure request until your user has agreed to
do so and knows of the risks. I can’t be sure that users will :/
I’ll see about putting in a catch for the errors though. That could spit back something… I have to think more about how to handle self-signed certs. There’s not a one-right answer or direction, since this plugin is intended to be simple and not something people have to mess around with customizing.
The issue, by the way, with errors is that I have to make sure there’s a way for users who aren’t techy to know what to do and how. It’s a black-box for a reason, since the users it’s intended for are often not tech savvy. There’s a case to be made both ways, of course. But it’s a lot of decisions and weighing information and it’s usefulness :/
Thanks for the thoughtful response.
I agree, disabling ssl_verify is probably not something to apply across the board. However, it is necessary to allow for self-signed certificates. Perhaps allowing the ssl_verify to be disabled via a filter makes more sense?
Regarding the messages, I understand the desire to keep things simple, but IMO the way it is now is doing more harm than good by always showing “Success” even in the event of an error. Even for users who are tech-savvy, it makes it unnecessarily difficult to troubleshoot. At least that was my experience.
Of course, it would be nice to have an explanation of how to fix a given error if there is one. Verbose error messages are definitely possible though. If the purge request does fail with a WP_Error, there could be different suggestions based on the error ID.
I’m open to contributing, if you are open to a PR?
Oh hell yes 🙂 PRs always welcome.
https://github.com/Ipstenu/varnish-http-purge/ – Master is a bit ‘ahead’ as I’m working through adding in some wp-cli commands and other tests.
I should probably say “A purge request has been sent” versus a real success message at the very least.