React app that is using mounteback as mock server, I am getting this error
Access to fetch at 'http://localhost:8080/xxx/api/secured/policies' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I managed to find this with regards to OPTIONS pre-flight https://groups.google.com/g/mountebank-discuss/c/G7TRM87Pocs
But even this is not enough, I had to had:
{
"is": {
"headers": {
"Content-Type": "application/json",
"Access-Control-Allow-Headers": "*",
"Access-Control-Allow-Methods": "*",
"Access-Control-Allow-Origin": "*"
}
}, ...truncated...,
}
For all the response stubs (I tried one and works, so means I need to do it for all). Is there any way I can add this headers in one central location so that I don't need to add this to all stubs (its an existing project with half-baked mocks, that are not working, had to use CORS-unblock plugin without this change)?