I need to get JSON response from fetch request to the server. I set a proxy and I'm getting 403 forbidden response when using proxy secure: false.But I can access the db from the browser url.
What can be the reason for that?
Also I want to add "bypass" to react proxy config in package.JSON. How can I do it?
"bypass": function (req, res, proxyOptions) {
req.headers['Access-Control-Allow-Origin'] = "*";
req.headers['Access-Control-Allow-Methods'] = 'GET,PUT,POST,DELETE';
req.headers['Access-Control-Allow-Headers'] = 'Content-Type';
}
Thanks!