We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Hosting on DigitalOcean App Platform - "mixed content"

Nick December 17, 2020 by Nick

Has anyone successfully deployed Statamic to DigitalOcean's App Platform?

I've hit multiple issues related to "mixed content" in the control panel. After some digging in this forum and discord, I've made progress, but no complete solution yet.

First, all assets were loading via HTTP, so the browser threw the "mixed content" error. Setting the APP_URL and ASSET_URL to the HTTPS variant and adding laravel-cloudflare (https://github.com/monicahq/laravel-cloudflare) proxies middleware (DO appears to be using Cloudflare) corrected that issue.

Now, AJAX calls with a trailing slash appear to be 301 redirected to an HTTP endpoint, then back to HTTPS with the slash trimmed.





at which point the "mixed content" error is thrown and we stop. If it wasn't, we'd redirect back to HTTPS:


Notice the trailing slash is trimmed.

I suspect this is a server configuration "issue" between DO and Cloudflare.

Any suggestions or ideas?

It's worth noting I've added URL::forceScheme('https') to the boot method of AppServiceProvider to no avail.

Would be really nice to get this running on App Platform since it's relatively hands-off.

>>>>>>> Unanswered <<<<<<<
10 Replies