By Paul Webb
Safari doesn’t respect my wildcard rule in CORS but Firefox and Chrome do. None of the suggestions in this StackOverflow post helped either: https://stackoverflow.com/questions/16824661/cors-request-not-working-in-safari/39875236.
I feel like this could be remedied if Spaces was configured to allow a URL without a TLD.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Thanks for flagging this issue for us. It looks like the input validation in our control panel is a bit too strict here. As a work-around until this experience is improved, you can create CORs configurations for Spaces using the API for origins without a TLD. For example, using s3cmd
you can run:
- s3cmd setcors cors.xml s3://example-space
Where the contents of the cors.xml
file contains your CORs configurations in XML format. For example:
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>http://localhost:3000</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>
CORS options are now available thru DigitalOcean Dashboard. If you are facing this problem:
Create a new configuration with this values:
*
GET
*
Should work.
With me Localhost works only after set a certified on php.ini.
https://curl.haxx.se/ca/cacert.pem
curl.cainfo = “path_to_cert\cacert.pem”
I hope help you guys!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.