I'm trying to make an axios get-request from a spa app to a python falcon server that should be all set for CORS requests. I'm providing the following headers to my request:
const getHeaders = {
headers: {
'Access-Control-Expose-Headers': 'X-json',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Origin': '*',
'Access-Control-Request-Method': 'get',
'Access-Control-Request-Headers': 'X-custom-header',
'Content-Type': 'application/json',
Accept: 'application/json',
},
};
There's a lot of stuff there because I've scavenged through a bunch of threads already trying to find a fix, but nothing seems to work for me.
I've managed to make requests to this same server before using JavaScripts fetch api and disabling cors on the browser with a chrome plugin.
I've hit a bit of a brick wall now, any help is appreciated. I'm using webpack-dev-server for development, but I've also got an express setup for production where I've tried to set these same headers with use on express, but the problem repeats.
Thanks!