SSL

Home Forums MapPress Support SSL

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14651
    dugsnpubs
    Participant

      Hi,

      I noticed an issue on posts where they were showing as insecure when I was browsing via https. I tracked it down to the mappress plugin. I upgraded to the latest one but the issue is still there. Can you confirm if it is likely to be the custom marker I am using. It is in the uploads / mappress folder. The style sheet is https so seems ok.

      An example url is below
      https://www.dugswelcome.com/dogsfriendlypubs/brewdog-aberdeen/

      Thanks

      #14652
      dugsnpubs
      Participant

        Hi

        yes it looks like it is the custom icon that is being loaded that is insecure. Are you able to confirm where I will update the code to https for the custom icon?

        thanks

        #14653
        Chris
        Keymaster

          Hi,

          MapPress uses the WordPress wp_upload_dir() function to get the icons directory (a subdirectory of the uploads directory).

          There are several WordPress tickets to add SSL for that function but none seem to have been implemented yet:
          https://core.trac.wordpress.org/ticket/25449

          For now, you could try the ‘upload_dir’ filter (from WordPress file wp-includes\functions.php) to change the result of the wp_upload_dir() function. I haven’t tested it, but something like this might work (add it to your functions.php file):

          function myfilter($uploads) {
            $uploads['baseurl'] = str_ireplace('http', 'https', $uploads['baseurl']);
            return $uploads;
          }
          
          add_filter('upload_dir', 'myfilter');
          

          Alternatively, you could modify MapPress to hard-code SSL. Change this line in mappress_icons.php to set the correct URL:
          $baseurl = $upload['baseurl'] . "/mappress";

          #14654
          dugsnpubs
          Participant

            Thankyou

            I went for the hard code option for now – I changed it to the https up to /mappress/ and ommitted the icons/image name from the url and seemed to work.

            cheers

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.