fruitcake / laravel-cors

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
MIT License
6.27k stars 613 forks source link

Dynamic origin based on withCredentials value #533

Open avivais opened 3 years ago

avivais commented 3 years ago

How can I achieve conditional allowed_origins based on withCredentials value?

I want to return '*' when it's false, or a specific domain when it's true