Browse Source

CORS support

needed for radiomanifest web clients
root 1 year ago
parent
commit
08dc666b24
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/Controller/PodcastRorController.php

+ 5 - 1
src/Controller/PodcastRorController.php

@@ -101,7 +101,11 @@ class PodcastRorController extends ControllerBase {
         )];
         //$variables['ror']['url'] = 
         $xml = $template->render($tmpl_data);
-        $resp = new Response($xml, 200, array( 'Content-Type' => 'application/rss+xml'));
+        $resp = new Response($xml, 200, array(
+            'Content-Type' => 'application/rss+xml',
+            'Access-Control-Allow-Origin' => '*',
+            'Access-Control-Allow-Methods' => 'GET',
+        ));
         return $resp;
     }
     public function podcastAll() {