This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Unsecure SSL when using ASP

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Unsecure SSL when using ASP

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12689
    Scholto BosScholto Bos
    Participant

    Hi Ernest,

    I tried to solve a small problem on my own, but broke my head. I hope you van help me. ASP creates an insecure content warning on the address bar whenever a search is performed.

    I checked my settings and they are all good. So the siteurl and homeurl are both set to https://http://www.finler.nl in my database settings.
    Next step was to check out my wp-config and I found this multisite setting:
    [code]define('DOMAIN_CURRENT_SITE', 'www.finler.nl');[/code]

    I changed it into:
    [code]define('DOMAIN_CURRENT_SITE', '<strong>https://</strong>www.finler.nl');[/code]

    I thought the problem was gone. Unfortunately I couldn’t access my network admin anymore and on frontend the images do not appear anymore in the ajax search pro results window.

    I realised that I added an extra piece of code in my wp-config file

    [code]/** Admin over SSL. */
    if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
    $_SERVER['HTTPS'] = 'on';
    }[/code]

    The reason is that my WordPress is hosted behind a reverse proxy that provides SSL. When I not add this code all the requests sent into an infinite redirect loop. pleae see the documentation over here

    Bottom line is that I can’t change the DOMAIN_CURRENT_SITE into https:// and that I can’t remove the Admin over SSL code. But i really don’t now how to fix the unsecure notification when using ASP.

    I hope you can help me.
    Kind regards,
    Scholto Bos

    #12698
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi!

    I think I know the reason, and a solution as well. So the SSL notification pops-up whevever a search is made. This is because the images might be parsed from the content, and served as-is, with the original non-SSL url.

    The resolution is very simple, and since you added FTP acces, I placed the following code to the bottom of the functions.php file in the child theme directory (Avada-Child-Theme), I hope you don’t mind:

    This code basically replaces any occurences of http content with https. It will also endure any updates in the future.

    I had plans to include this snippet somewhere in the core plugin code, but unfortunately my tests revealed, that in some cases wordpress still reports that the site URL is non-SSL or vice versa, so this would potentially break installations not affected by this issue.

    It should return the images with the proper SSL protocol url now.

    #12720
    Scholto BosScholto Bos
    Participant

    Hi Ernest,
    Thanks for the quick and great support! You can close the ticket.
    Kind regards,
    Scholto Bos

    #12723
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Unsecure SSL when using ASP’ is closed to new replies.