From: Mischa POSLAWSKY Date: Mon, 17 Aug 2020 16:40:04 +0000 (+0200) Subject: source: allow external website inclusion of json X-Git-Tag: v1.13~201 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/8cabb0d33e1686f3f2bf7a818388669639d8797d source: allow external website inclusion of json Header to permit data being used in modern browsers. --- diff --git a/source.plp b/source.plp index 5d445e5..f49c8ed 100644 --- a/source.plp +++ b/source.plp @@ -13,6 +13,7 @@ if ($source =~ s{(?<=\Q.inc.pl\E)/jsonp?$}{} and -r $source) { $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);