add me endpoint
This commit is contained in:
parent
b705d49aa1
commit
c0d0d070a8
5 changed files with 56 additions and 0 deletions
22
backend/config/cors.php
Normal file
22
backend/config/cors.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
$frontendUrl = (string) env(
|
||||
'FRONTEND_URL',
|
||||
'https://localhost:5173',
|
||||
);
|
||||
$allowedOrigins = array_values(array_unique([
|
||||
$frontendUrl,
|
||||
str_replace('localhost', '127.0.0.1', $frontendUrl),
|
||||
str_replace('127.0.0.1', 'localhost', $frontendUrl),
|
||||
]));
|
||||
|
||||
return [
|
||||
'paths' => ['api/*'],
|
||||
'allowed_methods' => ['*'],
|
||||
'allowed_origins' => $allowedOrigins,
|
||||
'allowed_origins_patterns' => [],
|
||||
'allowed_headers' => ['*'],
|
||||
'exposed_headers' => [],
|
||||
'max_age' => 0,
|
||||
'supports_credentials' => true,
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue