6

we want load some content from an SFMC Landingpage using AJAX on our Webpage.

But its not working in every Browser because the CORS Access-Control-Allow-Origin is missing on the SFMC Landingpage.

Is it possible to activate it?

1 Answer 1

11

I found out a Solution.

Its possible to Set the Header using Server-Side JavaScript within the Landingpage.

Here is my Header and its working fine now.

<script runat=server>
Platform.Load("core","1");
HTTPHeader.SetValue("Access-Control-Allow-Methods","POST");
HTTPHeader.SetValue("Access-Control-Allow-Origin","*");
</script>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .