page: allow remote access for xml requests
[minimedit.git] / page.php
index 0c101f8026e78dfe226e0350c56198c8f7e30136..3e3f4cc10e4db38f995f195a8023e3138c2130d4 100644 (file)
--- a/page.php
+++ b/page.php
@@ -83,7 +83,10 @@ else {
        }
 }
 
-if (!$Page->api and $_SERVER['HTTP_ACCEPT'] !== 'application/xml') {
+if ($_SERVER['HTTP_ACCEPT'] === 'application/xml') {
+       header('Access-Control-Allow-Origin: *');
+}
+elseif (!$Page->api) {
        include_once 'page.inc.php';
 }
 print $Page->render();