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
76
S
20
G
1
Posts: 109
Reputation: 5,254

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 44 guests

cron