Vote UpVote

CORS on DataSnap REST Server

The PodCast at Delphi.org – Cross-origin resource sharing (CORS) is a mechanism that enables resources to be shared across domains. Typically this isn’t allowed to prevent security issues. To enable on your DataSnap REST server you can use the following code per MVP Nirav Kaku from India. All you need to do is add a custom header in the Response before dispatching the result on the DataSnap server… procedure TWebModule1.WebModuleBeforeDispatch(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); begin //allows cross domain calls   Response.SetCustomHeader('Access-Control- ...
Favorite? Off-Topic? Jim McKeeth @ 2015-04-09 19:04


Visits: 871
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)