chore: cleanup CORS and localhost references in config

This commit is contained in:
dyzulk
2026-01-01 17:43:13 +07:00
parent 2ac24ca91c
commit 5a3e6b45ef
3 changed files with 4 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ return [
|
*/
'url' => env('APP_URL', 'http://localhost'),
'url' => env('APP_URL', 'https://api.trustlab.dyzulk.com'),
/*
|--------------------------------------------------------------------------
@@ -123,6 +123,6 @@ return [
'store' => env('APP_MAINTENANCE_STORE', 'database'),
],
'frontend_url' => env('FRONTEND_URL', 'http://localhost:3000'),
'frontend_url' => env('FRONTEND_URL', 'https://trustlab.dyzulk.com'),
];

View File

@@ -19,7 +19,7 @@ return [
'allowed_methods' => ['*'],
'allowed_origins' => ['http://localhost:3000', 'http://127.0.0.1:3000', 'https://trustlab.dyzulk.com', 'https://trustlab-api.dyzulk.com', 'https://trustlab.pages.dev', 'https://dev.trustlab.dyzulk.com'],
'allowed_origins' => explode(',', env('ALLOWED_ORIGINS', 'https://trustlab.dyzulk.com,https://api.trustlab.dyzulk.com,https://trustlab.pages.dev')),
'allowed_origins_patterns' => [
'#^https?://.*\.trustlab\.pages\.dev$#',

View File

@@ -16,10 +16,8 @@ return [
*/
'stateful' => array_merge(
explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1')),
explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'trustlab.dyzulk.com,api.trustlab.dyzulk.com,trustlab.pages.dev')),
[
'trustlab.dyzulk.com',
'dev.trustlab.dyzulk.com',
parse_url(env('APP_URL', ''), PHP_URL_HOST),
parse_url(env('FRONTEND_URL', ''), PHP_URL_HOST),
],