Send CORS header to allow javascript micropub clients
authorChristian Weiske <cweiske@cweiske.de>
Thu, 19 Apr 2018 19:03:40 +0000 (21:03 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Thu, 19 Apr 2018 19:03:40 +0000 (21:03 +0200)
E.g. https://github.com/jjdelc/grumble

www/token.php
www/www-header.php

index 6a7fa81..e7d9e9f 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 header('HTTP/1.0 500 Internal Server Error');
+header("Access-Control-Allow-Origin: *");
 
 function error($msg)
 {
index 466870d..3a7d606 100644 (file)
@@ -2,6 +2,8 @@
 require __DIR__ . '/../data/config.php';
 require_once __DIR__ . '/../src/anoweco/autoload.php';
 
+header("Access-Control-Allow-Origin: *");
+
 \Twig_Autoloader::register();
 
 $loader = new \Twig_Loader_Filesystem(__DIR__ . '/../data/templates/');