I have a website (configs.fun) hosted at Namecheap, it uses cloudflare & is HTTPS.
I have a server with digitalocean where I run my api, I added my domain to it so api.example.com/endpoint will resolve to my flask api. When I send a HTTP request from my web app (https://configs.fun/ to http://api.example.com/ I get a ‘Mixed Content’ error, api.example.com needs to be HTTPS (or my Flask Application does atleast). I have been looking to see how I can get certificates for Flask and I saw DigitalOcean offers certificates for your domains.
I made a new certificate for my domain & subdomain but I don’t know how I am going to make my Flask app run on HTTPS.
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!
Hi there,
What I could suggest is using Nginx as a reverse proxy for your Flask application. That way you will be able to add a Let’s Encrypt SSL using certbot.
You can follow the instructions on how to do that here:
Hope that this helps! Regards, Bobby
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.