CloudFlare Turnstile weird response.body issue

Hi there! I’m getting the following as response.data when posting to Cloudflare turnstile

!� �n�W�\�AF!K�'�R�A˝��b3G���BmxB�~Y�wM=9��

Tested on 3 different remote nodes, all with the same error… On my localhost, it works perfectly… Anybody with an idea why I get this output or what does it mean?

Started happening randomly today…

const response = axios.post(
  "https://challenges.cloudflare.com/turnstile/v0/siteverify"
);

On my local it returns: { success: false, ‘error-codes’: [ ‘missing-input-secret’ ] }
On my server it returns: !
f����b���LS��n�
N��R�8��a��ah��(A���?��˰,i��6�I�E��yf��@֎S�u
B�u\qO��4����A�m

There are all sorts of these messages popping up every now and than.

The only way I can force normal output on server is the following:

const response = axios.post(
  "https://challenges.cloudflare.com/turnstile/v0/siteverify",
  {}
);

Which not returns { success: false, ‘error-codes’: [ ‘bad-request’ ] }, because I posted {} json instead of form. If I post form, I always get a very weird output on server…

Any suggestions?

Hi,

This looks like a compressed (gzip?) response. Looking quickly at the axios GitHub, this seems related to your problem: Error response data nodejs · Issue #5298 · axios/axios · GitHub

1 Like

I spent 4 hours on this, and was nearly on point of switching to ReCaptcha… Thank you so much :smiling_face_with_three_hearts:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.