What am I missing? CORS with VOLT


#1

I may have a misunderstanding in how VOLT handles CORS and am not seeing it discussed in the forum.

I am building a proof of concept app that is making an a call to a remote server published to VOLT. In VOLT I have set the APP to allow the AJAX call to flow to any domain, but on testing the app I am getting the CORS errors. While VOLT allows CORS, is there some additional configuration needed somewhere else?

Here is the code, direct from the GetJSON example!

'GetJSON - gets some data from a site and processes it
'The data is a .json structure

Function Button1_onclick()
  GetJSON("https://somewhere.com/jasonhandler.php?Function=GetUser&Format=&APIKey=&PortalID=&Username=someuser&Password=somepassword", done)
End Function

Function done(data)
   Textarea1.value = data.Learner_LoginID & vbCRLF & data.Learner_LastName
End Function

#2

You’re not showing the CORS message. Is it coming from the remote server (https://somewhere.com)?


#3

Yes it is coming from the server. Apparently the server has to be allowed to support CORS as well? IIS has a lot of documentation to tht effect. I will give that a try.


#4

Yes. It’s reasonable for a server to have limits on what other web sites are allowed to do with it.