Best way to POST a form from IOS ContentSync app to AEM Servlet
Use Case - We have a shell IOS app and they content for the app comes from AEM Content Sync. We are introducing couple of forms to be submitted via App, these forms will POST data to a servlet on AEM Publish instance. The POST data contains fields outside the form data, coming form IOS application settings/configurations.
Issue - Sling Referrer Filter blocks the POST from the IOS app.
Possible Solution(s) -
1) Use AJAX based POST to Add referrer header
var main_url = "http://www.example1.com"; var referrer = "http://www.example2.com"; $.ajax({ url: main_url, dataType: "json", headers: {'X-Alt-Referer': referrer }, success: function(data){ console.log(data); } });2) Serve the form from AEM instead of the local content copy created by the ContentSync
What is the recommended approach, I would prefer not to make AEM call to serve the forms; from what I have been told, Apple has strict rules on serving such content in App