CORS problem when using mock server with Vue

I’m trying to use a mock server for my vue project, and I’ve been getting this error when I call a get.

Access to XMLHttpRequest at ‘https://13bcbcaa-8f9d-4f1f-b9a1-aefa66b64fbf.mock.pstmn.io/settings’ from origin ‘https://localhost:3001’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

Here’s what my setup looks like on Vue’s end:
image

Here’s what my headers look like on postman:

It’s complaining about not using the wildcard, but I’m specifying what I’m sending my requests from in “Access-Control-Allow-Origin”. The call works just fine when I turn off allow-credentials though.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.