mercure icon indicating copy to clipboard operation
mercure copied to clipboard

Caddyfile cors_origins

Open isurutg opened this issue 2 years ago • 9 comments

In caddyfile mercure cors_origins I need to allow all subdomains but when we use Auth header we cannot use wildcard. So is there any possibility to allow all subdomains?

Need to do something like this

mercure { ... @origin header Origin https://*.example.com cors_origins @origin {request.headers.Origin} }

isurutg avatar May 19 '23 13:05 isurutg

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 07 '23 04:08 stale[bot]

Any considerations on this? I need this too.

MaurizioMoreo avatar Sep 07 '23 10:09 MaurizioMoreo

Maybe could we delegate that to Caddy? The CORS handler we use (Gorilla) is deprecated so removing it is also a good opportunity to remove fix this issue.

dunglas avatar Sep 07 '23 16:09 dunglas

Is there any update to this? We are also facing an issue here as subdomains can be created more or less dynamically in our application. Adding a list of all subdomains to the configuration is not possible as another one could be created at any moment.

We are stuck on Mercure Hub version 0.10.4 because of this problem and can not update from there because of the change in webserver.

Is there possible any other way to come around this issue which I am overlooking right now?

xammmue avatar Nov 21 '23 12:11 xammmue

We've faced the same issue, working with dynamic subdomains, so we need wildcard for it to work

f1amy avatar Jun 13 '24 10:06 f1amy