add me endpoint

This commit is contained in:
Yisroel Baum 2026-07-31 10:50:06 +03:00
parent b705d49aa1
commit c0d0d070a8
Signed by: yisroelbaum
GPG key ID: 0FA60884F75520A9
5 changed files with 56 additions and 0 deletions

22
backend/config/cors.php Normal file
View 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,
];