'Postman Mock Service CORS Issue
Is there a way in Postman app where you can set CORS on the server side? I want to set it to just * but I keep getting random headers coming back from the server along with this error: The 'Access-Control-Allow-Origin' header contains multiple values ', *', but only one is allowed. Origin 'mycoolsite' is therefore not allowed access.
Solution 1:[1]
It seems you can set any header in the response that is part of the example. In my case I left 'access-control-allow-origin' blank not realizing that it needed to be set to *. You can find the headers in the headers tab in the response. Hope this helps someone!
Solution 2:[2]
I faced the same issue, my solution was adding the headers:
- Access-Control-Allow-Origin: {{applicationFullURL}}
- Access-Control-Allow-Credentials: true
In the response.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Dan Favano |
| Solution 2 | juniorb2s |

