By sloss196
Today, I was beginning the setup of a new service. After finally getting ready to start working on the authentication flows, I was greeted with Chrome spitting out Access-Control-Allow-Credentials errors. My CORS configuration is correct, however, I can’t seem to find a way to allow this through DigitalOceans app platform. The way our app is structured, we use a subdomain to handle all API requests and fetch data from it.
Has anyone heard anything about this, or know how to fix this issue? As far as I can tell, DigitalOcean has nothing for it, and manually setting this in my application code does not work either. Any help would be seriously appreciated.
It looks like I’m not the only one having this problem, and this is causing me major frustrations as it opens us to security problems having to store session tokens on the clients localStorage [which I refuse to do]
https://ideas.digitalocean.com/ideas/APPX-I-94 It seems they’ve ignored the idea of doing this as well.
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!
Same with me, just setup my api app and front-end app setup in digital ocean and just need to setup Access-Control-Allow-Credentials = true header to have all working… but if i cant the whole setup isn’t going to work 🤦♂️
@sloss196 @merryowen I finally solved this exact same problem by editing the App specification manually and uploading it to the App configuration in DO.
To set Access-Control-Allow-Credentials to True, you can add the following to the app spec:
- cors:
allow_credentials: True
Unfortunately, this doesn’t seem to be directly accessible via UI. The app spec file also provides many other configuration options, see https://docs.digitalocean.com/products/app-platform/references/app-specification-reference/.
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.