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.