I have a react client on port 8070 I'm getting requests from port 8090
Request: curl -X GET "http://localhost:8090/get/directory" -H "accept: application/json" -H "path: /"
This is how i'm fetching this request:
useEffect(() => {
const requestOptions = {
method: "GET",
headers: {
"Accept": "application/json",
"Path": "/",
"Access-Control-Allow-Origin": "*",
},
};
fetch(
"http://localhost:8090/get/directory",
requestOptions
).then((response) => console.log(response));
}, []);
This is what i've got:
Maybe someone has any ideas why i'm getting 403 error? Maybe something wrong with how i'm fetching this request?