Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

SSL with FoundationPress #868

Closed
jkaliski opened this issue Aug 8, 2016 · 4 comments
Closed

SSL with FoundationPress #868

jkaliski opened this issue Aug 8, 2016 · 4 comments

Comments

@jkaliski
Copy link

jkaliski commented Aug 8, 2016

Does anybody know how to modify functions.php of this theme in order to securely load image files?
I get an error message that the theme is loading .png .jpg .svg files insecurely and therefore I cannot use my SSL. Thanks for helping.

@olefredrik
Copy link
Owner

@jkaliski : If your site is set up to use https, you can enable the protocol relative theme assets function, by commenting out line 51 in functions.php

require_once( 'library/protocol-relative-theme-assets.php' );

@jkaliski
Copy link
Author

jkaliski commented Aug 8, 2016

Thanks for helping me sorting it out!

On 08 Aug 2016, at 19:39, Ole Fredrik Lie notifications@github.com wrote:

@jkaliski https://github.com/jkaliski : If your site is set up to use https, you can enable the protocol relative theme assets function, by commenting out line 51 in functions.php https://github.com/olefredrik/FoundationPress/blob/master/functions.php#L51
require_once( 'library/protocol-relative-theme-assets.php' );


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub #868 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AF89PmZZyPBYWwF9R2mv9v6CRZhVJ421ks5qd2m1gaJpZM4Je5hn.

@olefredrik
Copy link
Owner

No problem :)

@anthonyabraira
Copy link

anthonyabraira commented Sep 6, 2017

I tried what was suggested here but I am find that my issue arises from browser sync not updating during code edits. I have updated the gulp file by providing:

// Enter URL of your local server here
// Example: 'http://localwebsite.dev'
var URL = ''; // SSL Support
// var PORT = 443;

to

// Enter URL of your local server here
// Example: 'http://localwebsite.dev'
var URL = 'https://var.dev.com'; // SSL Support
var PORT = 443;

I also edited the gulpfile.js — 

// Browsersync task
gulp.task('browser-sync', ['build'], function() {

  var files = [
            '**/*.php',
            'assets/images/**/*.{png,jpg,gif}',
          ];

  browserSync.init(files, {
    // Proxy address
    proxy: URL,
    	 https: true, // SSL Support

    // Port #
    	port: 443
  });
});

to

// Browsersync task
gulp.task('browser-sync', ['build'], function() {

  var files = [
            '**/*.php',
            'assets/images/**/*.{png,jpg,gif}',
          ];

  browserSync.init(files, {
    // Proxy address
    proxy: URL,
    	 https: true, // SSL Support

    // Port #
    	// port: 443
  });
});

The browser then started refreshing but nothing was changing despite the updates to the code. I also got these errors in my console:

Failed to load resource: The certificate for this server is invalid. You might be connecting to a server that is pretending to be “var.dev.com” which could put your confidential information at risk.

Could really use some feedback on the required settings to get this working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants