From 8cabb0d33e1686f3f2bf7a818388669639d8797d Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Mon, 17 Aug 2020 18:40:04 +0200 Subject: [PATCH] source: allow external website inclusion of json Header to permit data being used in modern browsers. --- source.plp | 1 + 1 file changed, 1 insertion(+) 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); -- 2.30.0