HTTPS Always Redirect Enabled on CF - Nginx HTTPS Mixed Content Warning on WordPress 5.0+ AJAX Page Update call for URL by api-fetch.min.js WP File

Hi Cloudflare Community,

I first noticed this issue last year (2018) when I made the jump to Gutenberg.

I’ve tried the SSL Insecure Content Fixer plugin and switched it to ‘Capture All’ mode but it doesn’t seem to capture all, maybe because of the Nginx web server and it’s designed for Apache perhaps?

On another server I once tried 2 Search & Replace plugins to try and re-write all URLs in the WP database from http:// to https:// and it ended up destroying any update Ffnctionality from Elementor after that. This method was recommended in:

Some guy says he fixed it here with his Nginx config but I’m unsure as to what it does ti fix the issue apart from some URL rewrites at the Nginx level.

URLs in question:

WP JS Script:

Wasn’t an issue before WordPress 5.0 Gutenberg. Seems to be an AJAX http:// issue. I’ve noticed sometimes YouTube embed URLs get served as http:// from the YouTube API JS file too.

If I access the server via http://ipaddress, I can avoid this issue when I click update in the WordPress dashboard but it’s annoying having to backtrack every time I want to update or make a new page. In Elementor it can update regardless of domain name or ip address from the URL, since it seems to stuff HTML/CSS into the WP_posts table dynamically whereas when I hit update at the WordPress page, it does a different AJAX call process.

Any light on this situation would be much appreciated. Thank you.

You can try this:

  1. Make a backup of your WP installation & database
  2. Install and run Advanced Database Cleaner plugin
  3. Install the official Cloudflare plugin, set it to Automatic Cache Management.
  4. Go to WP Dashboard > Elementor > Tools > Replace URLs, change from old to new.
  5. Go to WP Dashboard > Elementor > Tools > General, click on Regenerate CSS (important as Elementor loads some images from its CSS)
  6. Back to the DB Cleaner, run it again
  7. Go to Cloudflare Dashboard or Plugin > Cache > Purge Everything

I hope it helps solve your issue. If it doesn’t, you might want to open a similar topic on forums dedicated to Nginx servers, as our focus here is to help with more strictly Cloudflare-related issues.

Best of luck!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.