-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuring CORS (Access-Control-Allow-Origin) #11
Comments
There's no built-in way to do this with Render yet, I might add one in the future but I'm still undecided. |
It would be really great to support headers in render, although in the meantime this sounds really interesting, I have never used the transformation rules, I can't get it to work, if for example this is the URL of the bucket I have done exactly the same but with |
You can check if the Host is equal to |
Thank you very much indeed I managed to get it working, you completely saved my day :) If it's ok with you I'll keep the issue open in case CORS handling is incorporated into Render (?) I think it's worth a look, also Vitali (Cloudflare developer) says it will come at some point but not soon, I thought it would with the public buckets in a couple of weeks, but that won't be the case, so it's a long way off... |
I added an ALLOWED_ORIGINS env var (configurable in wrangler.toml) so you can set an Yeah, I believe public buckets will be introduced early next month(?) Not sure how useful this repository will be then. |
I would like to know how I could apply an Access-Control-Allow-Origin to a certain domain from R2, could it be done with this worker? Currently the content of my bucket is not shown because of this.
The text was updated successfully, but these errors were encountered: