Luminova Framework

APIs Configuration

Last updated: 2024-05-22 22:59:17

These properties serve as essential configuration and security measures for your application's APIs. They allow you to define the origins permitted to communicate with your API endpoints and specify the allowed headers.

  • Class namespace: \App\Controllers\Config\Apis
  • File path: /app/Controllers/Config/Apis.php
  • This class is marked as final and can't be subclassed



Indicates whether to forbid requests with empty Origin headers.If true, requests with empty Origin headers are forbidden.

public bool $forbidEmptyOrigin = true


Set whether to allow credentials in API requests.If true, the Access-Control-Allow-Credentials header is included.

public bool $allowCredentials = true


Set the allowed origins for the Access-Control-Allow-Origin header in API requests.An array of allowed origins or a wildcard * to allows all origins.

public array<int,string>|string $allowOrigins = [

Note passing string null will result in allow all origins.


Set the allowed headers for the Access-Control-Allow-Headers header in API requests.An array of allowed header names.

public array<int,string> $allowHeaders = [