Browser vs Desktop app 2 questions


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 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

Question 1
The same test does not work from, it attempts to do this: Browser >> >> … localhost

How do I make browser to proxy calls through locally running prism, instead of “ It seems to be that “skipPrism”: true when defined in my Default or Local environments does not have any effect there.

Question 2.

  • 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: 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 I guess it’s enforced by Chrome.

1 Like