X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/d010615137911ff66a3e92a947eb4156593540af..d9ec472869a2c33c469cad90a21b221f14f29af3:/source.plp diff --git a/source.plp b/source.plp index 72fdf82..f49c8ed 100644 --- a/source.plp +++ b/source.plp @@ -10,9 +10,10 @@ if ($source =~ s{(?<=\Q.inc.pl\E)/jsonp?$}{} and -r $source) { my $data = do $source or die $@ || $! || 'read error'; require JSON; my $converter = JSON->new; - $converter->utf8->indent->space_after->canonical; + $converter->indent->space_after->canonical; $header{content_type} = 'application/json'; + $header{'Access-Control-Allow-Origin'} = '*'; $header{content_type} = 'text/plain' if exists $get{debug}; print $_, '(' for $get{callback} // (); print $converter->encode($data);