Home > Back-end >  Datasnap Server cross-domain access problems
Datasnap Server cross-domain access problems

Time:11-18

Use Datasnap Server development connect to the database service program, enter the URL on the browser to display the JSON data, in the javascript XMLHttpRequest, the status is 0, the responseText is always empty, debug state saw, service response, and returns the value of JSON.

Checked the online, you need to add cross-domain access
Response. SetCustomHeader (' Access - Control - Allow - Origin ', '*')
But all the solutions are based on the Datasnap REST Application, because of my program is based on the Datasnap Server, don't know where to add the Access - Control - Allow - Origin, don't I want to change the program to based on Datasnap REST Application?

What is the difference between other Datasnap REST Application and Datasnap Server?

CodePudding user response:

Delphi development database three layer application DataSnap, on Android can achieve, is to keep both, can be more than the same period, or Vpn connection,
  • Related