Description
What needs to be done?
For web and multiplatform projects, publish the CORS configuration file, and update it so CORS settings apply to all application routes.
Required changes:
- Run the command:
php artisan config:publish cors - In the published
config/cors.php file, change 'paths' => ['api/', 'sanctum/csrf-cookie'] to 'paths' => [''] - The config file must be placed in the
config directory, which matches the project structure.
Expected Outcome
What is the expected result?
- For
mobile project file config/cors.php doesn't exist. - For
web and multiplatform projects the file config/cors.php exists in the project. - For
web and multiplatform projects in config/cors.php, the paths value is set to [''] - No other CORS config parameters are changed.
Verification Scenarios
How can this be tested?
- Check that the file
config/cors.php exists in the web and multiplatform project. - Check that the file
config/cors.php doesn't exist in the mobile project. - Open
config/cors.php and verify the paths parameter is set to [''] - Compare the published config with the default version and confirm no other parameters were changed unnecessarily.
- Test requests to different application routes and confirm CORS headers are applied consistently.
Resources
Materials (Screenshots, Figma Links, References)
Description
What needs to be done?
For
webandmultiplatformprojects, publish the CORS configuration file, and update it so CORS settings apply to all application routes.Required changes:
php artisan config:publish corsconfig/cors.phpfile, change'paths' => ['api/', 'sanctum/csrf-cookie']to'paths' => ['']configdirectory, which matches the project structure.Expected Outcome
What is the expected result?
mobileproject fileconfig/cors.phpdoesn't exist.webandmultiplatformprojects the fileconfig/cors.phpexists in the project.webandmultiplatformprojects inconfig/cors.php, thepathsvalue is set to['']Verification Scenarios
How can this be tested?
config/cors.phpexists in thewebandmultiplatformproject.config/cors.phpdoesn't exist in themobileproject.config/cors.phpand verify thepathsparameter is set to['']Resources
Materials (Screenshots, Figma Links, References)
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
data-testid="icon"