My flutter website currently uses Appwrite as a backend. Until now i've been able to send requests to Appwrite and everything was working perfectly fine. I've now installed and set up a SSL certificate using Lets Encrypt and now instead of "demo.edventures.ai" my website is able to be accessed using "https://demo.edventures.ai". However now when I send requests from my https site, I get this error. How can I fix it?
main.dart.js:45239 Mixed Content: The page at 'https://demo.edventures.ai/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://178.128.196.153/v1/account'. This request has been blocked; the content must be served over HTTPS.
Well I assume that's the expected behaviour when you send requests from an app served with HTTPS, to an app served on HTTP
Considering http://178.128.196.153/ is where appwrite is running, you will probably need to setup HTTPS on this server
FYI, it's best to use a proxy like nginx to create what are called "proxy hosts"
Is there any documentation available to do this on appwrite?
Also does this mean I will need to install a SSL certificate on the appwrite server itself? I currently use Nginx for my flutter SSL
If you have a domain set up and pointing at Appwrite, Appwrite can generate an SSL certificate automatically. Just set the domain in __APP_DOMAIN
Are there instructions available for this in appwrite documentation?
Instructions for what?
does this domain need to be my external website that uses appwrite as a backend, or do I need an entirely separate domain specifically for my Appwrite backend? My appwrite backend is currently self-hosted on a digital ocean droplet, and I currently access it using the public IP address provided by the digital ocean droplet.
Why can't you set up appwrite.demo.edventures.ai to point to your droplet?
So my main domain is currently "edventures.ai" and the subdomain my flutter website uses is "demo.edventures.ai". I just wanted to clarify if it was okay to use the current domain, or whether I needed to use a separate one. In this case, I will likely be using "appwrite.edventures.ai". Does this seem like an appropriate solution based on your knowledge?
Appwrite should be a subdomain of your app. So if your app is demo.whatever, Appwrite should be on appwrite.demo.whatever
Thank you @Steven ! I’m working together w Taha so I’m jumping into the conversation.
Our plan is to only use the demo.edventures domain for as long as we’re testing the app and until we’ve developed a full MSP. Once we’ve developed the MSP, we plan on having the app under ‘app.edventures.ai’ or something like that as a permanent subdomain for the webapp.
To make it easier for us, and not having to change the domain of our Appwrite backend/server, wouldn’t it be better to give our Appwrite backend a subdomain of its own (for example, "appwrite.edventures.ai")? Or would that complicate things for how the Appwrite backend runs?
As I mentioned, you should use a custom domain for the domain your app is connecting to where the domain is a subdomain of your app
it should be pretty easy to add additional subdomains in Appwrite and for your app.
alright, thank you!
Recommended threads
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...
- Realtime with multiple connections
I need the Realtime on multiple Collections for diffrent applicational logic. So my question is: Is there a way to have only 1 Websocket connection or do I need...