<?php
require_once(realpath(dirname(__FILE__).'/../../lib/php/maps.php'));
-$nohtml = (bool)( self::php_cli() or self::client_content_type('text/plain') != 'text/html' );
+$html = ( self::php_cli() or self::client_content_type('text/plain') != 'text/html' ) ? true : false;
+if ($html) {
+ # CORS Cross scheme allowed
+ header('Access-Control-Allow-Origin: *');
+ header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
+}
+
$DBQ['pub'] = [
- 'row_parse_post' => $nohtml ? null : function(&$r,&$t) { Maps::html($r); },
+ 'row_parse_post' => !$html ? null : function(&$r,&$t) { Maps::html($r); },
];
?>