Skip to content

Commit

Permalink
feat: add cors for api/* urls
Browse files Browse the repository at this point in the history
  • Loading branch information
mashb1t committed Mar 9, 2022
1 parent 18a19f0 commit b16f5d8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions php/src/config/cors.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@

'paths' => ['api/*'],

'allowed_methods' => ['*'],
'allowed_methods' => ['POST', 'GET', 'OPTIONS', 'PUT', 'DELETE'],

'allowed_origins' => ['*'],
'allowed_origins' => [
env('APP_URL', 'http://localhost'),
env('GRAFANA_URL')
],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],
'allowed_headers' => ['Content-Type', 'Cache-Control', 'Authorization', 'X-Requested-With'],

'exposed_headers' => [],

'max_age' => 0,
'max_age' => 86400,

'supports_credentials' => true,

Expand Down

0 comments on commit b16f5d8

Please sign in to comment.