Rank 4: Virtual Machine
I'm trying to make sure I understand how Appwrite works with SSL, specifically with Cloudflare. I understand that Appwrite uses LetsEncrypt to generate the SSL certificates in the cert worker using the webroot method. So instead of using DNS ("when I visit the url it resolves to the IP of the origin") it demonstrates to letsencrypt that it has control of the origin by hosting a file at a specified location.
There are recommendations on this discord server to set Cloudflare to Full and Flexible, however I'm not sure if both are correct and if both are correct why so.
I believe that Full can work for your primary domain (which are the environment variables _APP_DOMAIN and _APP_DOMAIN_TARGET) and Flexible can cause issues if you've set Appwrite's env var _APP_OPTIONS_FORCE_HTTPS to enabled because Cloudflare will expect HTTP (port 80) but Appwrite changes it to HTTPS (port 443)... and it cycles like that forever until you get the too many redirects error.
So can Appwrite work with Cloudflare with Full SSL, _APP_OPTIONS_FORCE_HTTPS enabled, with all the generation of certificates working correctly?