We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 20215
    • 144 Posts
    Hi,
    I have a problem since I activated the ssl certificate and https
    my jquery ajax call
    var posting = $.ajax({
      type: 'POST',
      url: 'https://www.xxxx.tld/../ajaxaddproduct/',
      data: datapost,
      crossDomain: true,
      async:true
    });
    
    posting.done(function( data ) {
    ...
    });
    

    I open the page with https

    Mixed Content: The page at 'https://www.xxx.tld/catalog' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.xxx.tld/../ajaxaddproduct/'. This request has been blocked; the content must be served over HTTPS.

    I don't understand why it is served in http!

    my htaccess
    RewriteEngine On
    RewriteBase /
    # RewriteCond %{HTTP_HOST} .
    # Force all pages to go to www.dominio.tld for SEO
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


    I also set the system setting server_protocol to https

    This question has been answered by mopmodx. See the first response.

      ----------------------------------
      canale irc Italiano #modx server: tophost.azzurra.org
    • discuss.answer
      • 20215
      • 144 Posts
      Solved!
      the problem was the simplecart snippet from the page ajaxaddproduct

      [[!scAddProduct]] redirect to http
      [[!scAddProduct? &redirectScheme=`https`]]
        ----------------------------------
        canale irc Italiano #modx server: tophost.azzurra.org