Open joejoe04 opened 2 years ago
@joejoe04 Don't we have a problem too when validating the API key when self-requests are blocked?
@GeekPress Yes, you're right, it also applies to API key validation when self-requests are blocked. So maybe there could be different error popups, depending on the situation. Maybe something like:
A firewall, server setting, HTTP Authentication, or a security plugin is preventing image optimization.
A firewall, server setting, HTTP Authentication, or a security plugin is preventing validation of your Imagify API key.
When the self-requests for optimization are being blocked by a user's server due to firewall setting, HTTP authentication, security plugin, or something similar, Imagify Tools shows something like this (though the error codes can also be 401 or 403):
We could offer a popup informing users this is the cause and linking to possible solutions:
The code below links to the same Optimization is Stuck page as we do for cURL Error 28 / timeout issues, and we could add a section to it specifically for these cases with suggestions like:
• Whitelist 51.68.166.142 with the server or possibly security plugins
• Use the following in wp-config.php if site is behind HTTP authentication:
• Disable security plugin
Or we could create a new page with these suggestions, whatever the team thinks is the best option.
<div id="swal2-content" class="swal2-content" style="display: block;">A firewall, server setting, HTTP Authentication, or security plugin is preventing image optimization. <a href="https://imagify.io/documentation/optimization-is-stuck/" rel="noopener" target="_blank">More info and possible solutions</a>.</div>