Afegir opciĆ³ per establir la capƧalera Access-Control-Allow-Origin
Change-Id: I44b50336989c91fd054615978dc9c59ebef513a3
diff --git a/inc/API.php b/inc/API.php
index 0d5530e..ccc2c94 100644
--- a/inc/API.php
+++ b/inc/API.php
@@ -39,8 +39,8 @@
header('Content-Type: application/json');
- if (isset($conf['frontendUrl']) && !empty($conf['frontendUrl']))
- header('Access-Control-Allow-Origin: '.$conf['frontendUrl']);
+ if (isset($conf['allowedOrigin']) && !empty($conf['allowedOrigin']))
+ header('Access-Control-Allow-Origin: '.$conf['allowedOrigin']);
$parts = explode('/', $path);
$method = $parts[0] ?? '';