google-recaptcha icon indicating copy to clipboard operation
google-recaptcha copied to clipboard

Referer not pass to recaptcha enterprise

Open marcoaring opened this issue 6 months ago • 3 comments

First of all, thank you for all the job you done in this amazing project.

So, congratulations given, let's get to the bug

When I run my application with the recaptcha enterprise, i recived a strange 500 error.

{ "statusCode": 500, "message": "Network error 'ERR_BAD_REQUEST'." }

So I run this API from recaptcha independently and discovered that is necessary pass a header called Referer with a allowed domain.

After know all this information I changed the code of you package in my own repo and change this header pass a valid Referer header.

I thing is very interessant make a new prop in initialization of the package to pass a "custom referer" or get the headers from the axiosConfig prop. (I tried this and unfortunately don't worked).

In below is the error from debug:

{ "error": { "code": 403, "message": "Requests from this referer are blocked.", "status": "PERMISSION_DENIED" } }

marcoaring avatar Aug 21 '24 22:08 marcoaring