• Resolved spikefish

    (@spikefish)


    I’ve got a site running w3 total cache with max cdn, configured to deliver over https:// with WP Force SSL plugin and by setting site names, using maxcdn https:// option to deliver files.
    Everything works fine until I try to minify the CSS files, then, fonts that are requested by the minified css files are requested at http://..CDN url instead of https://, so the fonts don’t load and there’s the mixed content / not fully secure warning.
    How do I minify css and have the minified css request fonts via https://?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter spikefish

    (@spikefish)

    I seem to have gotten this working, in case this helps anyone else in the future, I could work around it a couple different ways, by selecting to either not host the minified css / js on cdn or by ‘not’ hosting (remove from ‘Theme file types to upload:’) *.otf;*.woff; on cdn – the latter seems to be the best way, as the fonts are still hosted through the cdn, being relatively referenced in the cdn hosted css files / rewritten urls correctly displaying https:// this way.

    Hi Spikefish,

    I’m having this same issue with Cloudfront. I tried what you said, removing the files types from the “Theme file types to upload” (*.woff, *woff2, *tft, etc.), but it did not work. I’m wondering is it because I’m using Cloudfront Pull, so no files are actually ever uploaded by W3TC, so this never comes into play.

    I tried using the Reject files options, but could not get that to work. My minified and combined css files, still have the CDN URL as http:// scheme. I would like it to not touch this URL, so that the scheme would be relative. Because the boostrap.min.css file is loaded from the CDN, then the fonts files would also be loaded from there as well.

    Specificially this is happening in bootstrap.min.css which has

    @font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'), etc

    gets replaced with

    @font-face{font-family:'Glyphicons Halflings';src:url(http://cdn5XXXX/sgmwp/wp-content/themes/se-2016/js/bootstrap/fonts/glyphicons-halflings-regular.eot);src:url(http://cdn5XXXX/sgmwp/wp-content/themes/se-2016/js/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(http://cdn5XXXX/sgmwp/wp-content/themes/se-2016/js/bootstrap/fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(http://cdn5XXXX/sgmwp/wp-content/themes/se-2016/js/bootstrap/fonts/glyphicons-halflings-regular.woff) format('woff'),url(http://cdn5XXXX/sgmwp/wp-content/themes/se-2016/js/bootstrap/fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(http://cdn5XXXX/sgmwp/wp-content/themes/se-2016/js/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';

    Does anyone know how to do this?

    Thanks,
    Rich

    Thread Starter spikefish

    (@spikefish)

    Odd, css rewriting was done (I thought) because of the setting ‘Theme file types to upload’. In my experience, it “uploads” just by rewriting the css so it’s called from cdn, therefore it pulls to the cdn. (My config is a pull zone as well)

    Guess the only things I can suggest are basic, confirm the fonts aren’t included in the custom files list, be sure you’ve cleared the minify cache and the cdn cache (and browser cache, if applicable). This looks like the exact issue, so I’m not sure why it isn’t working! You could see if the less desirable workaround works (not hosting minified files) – of course this isn’t fully utilizing cdn, but if it works, it could help pinpoint the issue.

    If none of those work, you may want to start a new thread so more people see your question, as this one has been marked resolved.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Minify CSS, fonts not requested over SSL’ is closed to new replies.