summaryrefslogtreecommitdiff
path: root/src/App.php
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2022-01-05 16:39:07 +0100
committerDaniel Weipert <code@drogueronin.de>2022-01-10 11:29:13 +0100
commit47e6d88484eba2733551de9edde8c4ac58706e5e (patch)
tree1ca32046be32e67c795127e09e951aea92861200 /src/App.php
parent39c0f9b8346447b27d65da1d62f8e03697fe8907 (diff)
Add CORS header
Diffstat (limited to 'src/App.php')
-rw-r--r--src/App.php1
1 files changed, 1 insertions, 0 deletions
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();
}