added API and login

This commit is contained in:
Jürg Hallenbarter
2026-04-29 16:01:19 +02:00
parent deba81fadb
commit 6cbb6a2e3e
19 changed files with 2729 additions and 3 deletions

View File

@@ -34,7 +34,7 @@ class Cors extends BaseConfig
* - ['http://localhost:8080']
* - ['https://www.example.com']
*/
'allowedOrigins' => [],
'allowedOrigins' => ['*'],
/**
* Origin regex patterns for the `Access-Control-Allow-Origin` header.
@@ -68,7 +68,7 @@ class Cors extends BaseConfig
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
*/
'allowedHeaders' => [],
'allowedHeaders' => ['Content-Type', 'Authorization', 'X-API-Key'],
/**
* Set headers to expose.
@@ -93,7 +93,7 @@ class Cors extends BaseConfig
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
*/
'allowedMethods' => [],
'allowedMethods' => ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
/**
* Set how many seconds the results of a preflight request can be cached.