Sfoglia il codice sorgente

CORS support

needed for radiomanifest web clients
root 1 anno fa
parent
commit
08dc666b24
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  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() {