From 202561f39efc6fe694b5819e0e853f4230e0eff6 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sat, 1 Jun 2013 00:58:21 +0000 Subject: README: add something about Access-Control-Allow-Origin headers git-svn-id: svn+ssh://svn.mageia.org/svn/soft/mga-treasurer/trunk@8414 5b7c3c08-40e5-403b-9995-ace06908e4af --- README | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README b/README index b9e4e2b..b44df73 100644 --- a/README +++ b/README @@ -42,3 +42,19 @@ For testing, you can set the environement variable MGATRES_CONF to the path of a default configuration file that will be used instead of /usr/share/mga-treasurer/config. + +JSON files and http headers +--------------------------- + +So that the json files can be used from pages on other domains with +XMLHttpRequest, the http header Access-Control-Allow-Origin needs to be +set. See this page for details : +https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS + +To add the header for .json files, you can use something like this in +apache configuration, inside the VirtualHost definition : + + + Header set Access-Control-Allow-Origin "*" + + -- cgit v1.2.1