I have WebServer running on my local host with REST endpoint, let’s say POST /currentTime
- I have documented this endpoint in Stoplight.
- Created LoginTest in Stoplight (I can see it in Stoplight desktop app and in next.stoplight.io via browser).
- I configured my Environments by adding there location of my WebServer.
- Can successfully run test from Desktop app. It works like this: Desktop app >> local prism >> http://localhost:port/currentTime
How do I make browser to proxy calls through locally running prism, instead of “https://prism.stoplight.io” It seems to be that “skipPrism”: true when defined in my Default or Local environments does not have any effect there.
- In the documentation of my endpoint I have an option to send “Test request”.
- My WebServer supports CORS, so I have ticked “Send requests directly from the browser (CORS must be enabled)”.
- When I send test request I can see that Browser is talking to my Web server directly like this:
Browser >> http://localhost:port/currentTime, it sends Options.
- The security of my WebServer blocks this request due to wrong Origin header, in this case (Origin: https://next.stoplight.io). CORS enabled and works.
Is there a way to configure my “Send Request” to use Origin which I specify and which is trusted by my local WebServer instead of https://next.stoplight.io? I guess it’s enforced by Chrome.