From 47e6d88484eba2733551de9edde8c4ac58706e5e Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Wed, 5 Jan 2022 16:39:07 +0100 Subject: Add CORS header --- src/App.php | 1 + 1 file changed, 1 insertion(+) (limited to 'src/App.php') diff --git a/src/App.php b/src/App.php index b270b02..107113a 100644 --- a/src/App.php +++ b/src/App.php @@ -106,6 +106,7 @@ class App } $response->headers->set('Content-Type', 'application/json'); + $response->headers->set('Access-Control-Allow-Origin', implode(',', $config['api']['cors']['origins'])); $response->setContent(json_encode($content)); $response->send(); } -- cgit v1.2.3