I am currently trying to connect my web client to its back-end architecture. Everything is set as it should and everything seems to be working correctly, except that I have got the following error:
I am currently building this client with react and the connection to the backend has been made with the following model:
model.js (of the Orchestrator // back-end connection)
// Model of the orchestrator based on the backend itself
export const stateNamespace = 'orchestrator';
export const initialState = {
connectionParameters: {
protocol: process.env.REACT_APP_ORCHESTRATOR_PROTOCOL || 'https',
hostname: process.env.REACT_APP_ORCHESTRATOR_HOSTNAME || 'localhost',
port: parseInt(process.env.REACT_APP_ORCHESTRATOR_PORT) || 8443,
},
}
export function reducer (localState, action){
switch (action.type){
default:
}
}
and here is the .env file linked to it:
REACT_APP_ORCHESTRATOR_PROTOCOL = https
REACT_APP_ORCHESTRATOR_HOSTNAME = localhost
REACT_APP_ORCHESTRATOR_PORT = 8443
Is there anything that I could do to fix this? I have spoken to some people and they said that most probably I would need to serve the CORS headers in the react dev server, however I have no clue how to do so. Or is it a back-end side issue and I cannot do anything?