diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-27 14:51:03 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-09-27 14:51:03 +0100 |
commit | 2b29154ffb678522152c951eff47a9f9e3757f1e (patch) | |
tree | 3f5d3ef04bc0a443f4a17d0ead8ba77907007348 | |
parent | 781078aeb52ad838c682ebb061ccc2a28d3e53b1 (diff) |
Include CORS cross-origin header in RSS output.
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 1 | ||||
-rw-r--r-- | t/app/controller/rss.t | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 183b233a8..28f1aba43 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -207,6 +207,7 @@ sub generate : Private { $out =~ s{(<link>.*?</link>)}{$1<uri>$uri</uri>}; $c->response->header('Content-Type' => 'application/xml; charset=utf-8'); + $c->response->header('Access-Control-Allow-Origin' => '*'); $c->response->body( $out ); } diff --git a/t/app/controller/rss.t b/t/app/controller/rss.t index 8b39219fa..4f737dda7 100644 --- a/t/app/controller/rss.t +++ b/t/app/controller/rss.t @@ -50,6 +50,7 @@ FixMyStreet::override_config { }; $mech->content_contains( "Testing, 10th October" ); $mech->content_lacks( 'Nearest road to the pin' ); +is $mech->response->header('Access-Control-Allow-Origin'), '*'; $report->geocode( { |