Help with loading JSON file from cross-domain URL

Get help using Construct 2

Post » Thu Sep 25, 2014 9:57 pm

Hi,

I need to load a JSON file from my server, but it needs to work in any domain.

I read this on manual:
If you want AJAX requests to your server to work from any domain, or in preview, you can configure it to send the following HTTP header:

Access-Control-Allow-Origin: *

This will enable AJAX requests from any domain


But this is not clear for me. How I can configure it? In my searches i find about a php header
Code: Select all
header('Access-Control-Allow-Origin: *')
But how i can add this HTTP header in a JSON file?
B
73
S
19
G
1
Posts: 107
Reputation: 5,070

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 23 guests