Axios not sending custom headers in request (possible CORS issue)

Ok. so your case is preflight request. when client tries to send a custom header, server needs to verify that it accepts that header.

so in that case, a preflight options request is sent with header Access-Control-Request-Headers. if server responds that it will accept the custom header. then actual request will be sent.

in your case server response header - access-control-allow-headers does not contains your custom header name. thats why it failed.

enter image description here

Note: the actual POST request does not include the Access-Control-Request-* headers; they are needed only for the OPTIONS request.Read this article for more explanation - cors - options call