I'm trying to configure a laravel server as an OIDC provider. For my local machine, it works well, unless I change my origin away from one listed in my CORS policy.
The issue is that laravel is still populating the cors headers for my OIDC well-known route, and so the client fails fetch/xhr GET requests.
Is there some way I could achieve (1), but only for the well-known route? older Laravel packages allowed me to configure different profiles based on the host. What I need here, is that all hosts may access the .well-known group.
Finally figured it out!
In config/cors.php
the paths key can accept either
Thus i made a CORS policy for my frontend hosts, and a CORS policy for my OIDC routes.