I have created a droplet on digital ocean for appwrite and have and also i have deployed a react application using appwrite in the digital ocean. When i try to access the appwrite it shows the error: The page at 'https://example.com/login' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://153.246.45.23/v1/account/sessions/email'. This request has been blocked; the content must be served over HTTPS. I think the problem is trying to access http from https. As i see my appwrite is running as not secure. Is there a way to change it to a secure https endpoint?
Yes
Change the value of _APP_OPTIONS_FORCE_HTTPS
to enabled
inside
/root/appwrite/.env
Then run docker compose down && docker compose up -d
If you have domain then the best practice would be to also set this values with your domain in the .env
file
_APP_DOMAIN=your-domain.com
_APP_DOMAIN_TARGET=your-domain.com
Then run docker compose down && docker compose up -d
again
Sorry if the doubt is too basic, iam not using docker , iam using digital ocean droplet . Can i change the value of _APP_OPTIONS_FORCE_HTTPS ? and will it work?
You mean you use this? https://marketplace.digitalocean.com/apps/appwrite
yes
Its the same. it's using Docker & the docker.compse.yml
file it just do all the work for you. Installing docker config etc.
All of the files are located in /root/appwrite/
So you're able to follow the instructions above
ok Let me try and get back to you
Thank you, it worked
[SOLVED] Digital Ocean Deployment
Recommended threads
- Error When load the website
Hi, I am getting this error whenever I reload my website please help me, I am using react Error: ** GET https://cloud.appwrite.io/v1/account 401 (Unauthoriz...
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...