I ran into a similar issue that folks discussed in #71, where after following the instructions for Lumen use, I get
In InvalidCorsProfile.php line 10:
Argument 1 passed to Spatie\Cors\Exception\InvalidCorsProfile::profileDoesNotExtendDefaultProfile() must be of the type string, null given, called in /app/vendor/spatie/laravel-cors/src/CorsServiceProvider.php on line 23
What was missing on my end was that after
Copying the cors.php config into the config directory
registering CorsServiceProvider and the Cors middleware in the app's bootstrap file,
I ran into a similar issue that folks discussed in #71, where after following the instructions for Lumen use, I get
What was missing on my end was that after
cors.php
config into theconfig
directoryCorsServiceProvider
and theCors
middleware in the app's bootstrap file,I had to tell Lumen about the new config file.