File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 55 /* Set route prefix for the blog API */
66 'route_prefix ' => env ('BLOG_API_ROUTE_PREFIX ' , 'api ' ),
77 ],
8+
9+ 'cors_custom_domain_pattern ' => env ('CORS_CUSTOM_DOMAIN_PATTERN ' , '/^$/ ' ),
810];
Original file line number Diff line number Diff line change @@ -76,10 +76,10 @@ private function getAllowedOrigins(): array
7676 {
7777 $ baseOrigins = [
7878 // Environment-specific URLs from .env
79- env ( ' BLOG_FE_URL ' ),
80- env ( ' BLOG_ADMIN_URL ' ),
81- env ( ' BLOG_API_URL ' ),
82- env ( ' APP_URL ' ),
79+ config ( ' blog-core.fe_url ' ),
80+ config ( ' blog-core.admin_url ' ),
81+ config ( ' blog-core.api_url ' ),
82+ config ( ' app.url ' ),
8383
8484 // Development origins
8585 'http://localhost ' ,
@@ -139,7 +139,7 @@ private function getAllowedPatterns(): array
139139 */
140140 private function getCustomDomainPattern (): string
141141 {
142- $ customDomain = env ( ' CORS_CUSTOM_DOMAIN_PATTERN ' );
142+ $ customDomain = config ( ' blog-api.cors_custom_domain_pattern ' );
143143 return $ customDomain ?: '/^$/ ' ; // Empty pattern if not set
144144 }
145145
You can’t perform that action at this time.
0 commit comments