I am trying to nock an axios request. I have successfully mocked the POST request, but it is sending an OPTIONS preflight request. However, I am getting the following error and not sure what to make of it.
Error: Headers Authorization forbidden
I am trying to nock an axios request. I have successfully mocked the POST request, but it is sending an OPTIONS preflight request. However, I am getting the following error and not sure what to make of it.
Error: Headers Authorization forbidden
Are you using jsdom? You will most probably need to add the following reply header:
'access-control-allow-headers': 'Authorization'