Camunda 8 self hosted in Docker, accessing from nodejs with jwt token throws cors error

Help in resolving the issue:
Used camunda 7 using Java API. Now moving for camunda 8 for a new app.
Preferred the self hosted approach and deployed the docker in local machine and running the components well. Now created the nodejs app to communicate with camunda.

Since no proper straight away document tutorial found, we came into getting the jwt token, and used to send http://localhost:8082/v1/tasks/search to get the tasks for a filter criteria,but failed with cors missing allow origin error. Where to configure or how to make it working first in local machine.

Code is below:
const requestOptions = {
method: ‘POST’,
headers: { ‘Content-Type’: ‘application/json’ },
‘Cookie’: ‘TASKLIST-SESSION={tasklistSessionId}’,
Authorization: ‘Bearer ’,
body: JSON.stringify({ “state”: “CREATED”,
“assignee”: “demo”})
};

const fetchCamundatasks = () =>{
fetch(‘http://localhost:8082/v1/tasks/search’, requestOptions)
.then(response => { return response.json()
})
.then(data => {setData(data)
})
.catch((error) => {
console.log(error);
})
};