composer-wp-pro-plugins
composer-wp-pro-plugins copied to clipboard
Ninja Forms download fails
This ticket is mainly for informational purposes.
For the past two weeks, this Composer plugin has been unable to fetch the download URL for Ninja Forms add-ons.
If I change the internal API request from GET
to POST
, it works.
On May 24th, I contacted support about the issue. They replied that they would look into it.
On June 9th, I figured out why GET
requests are not working:
Ninja Forms introduced a cookie consent banner that stores a nf_cc
cookie.
If this cookie is not defined when making the API request, their server returns the HTML home page.
If this cookie is defined when making the API request, their server returns the expected JSON response.
curl -X GET -I -H 'Cookie: nf_cc=' 'https://ninjaforms.com/?edd_action=get_version&license=XXXXXX&item_name=File+Uploads&url=ZZZZZ&version=3.3.15'
I've updated support about the issue. Awaiting their response.
Should we integrate a fallback request using POST
if GET
fails?
@mcaskill Should we just make it POST
for Ninja forms?
We could. Maybe we should switch all EDD plugins to POST
in case any others deploy some kind of plugin or software that hijacks the GET
request 🤷♂️.
In my fork of this Composer plugin, I've switched only Ninja Forms to POST
for the time being.
Given no one else has noticed / encountered / raised the issue, we could do nothing about it for now.
Sounds good, lets wait for customer support to get back to take a call on what to do.