title: jQuery AJAX Request to HTTPS getting served to HTTP with Laravel and Select2
body: <p>I have a relatively simple Laravel app, that features an HTML form which contains a tag select element. The select element gets enhanced via select2 library. The tags are fetched via an XMLHttpRequest. I've <a href="https://jsfiddle.net/bjwxcxa2/6/" rel="nofollow">created a fiddle</a>, and the error I receive there is the same as on my production machine: </p>
  
  <blockquote>
    <p>[...]was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<a href="http://blog.mazedlx.net/tags?term=asd" rel="nofollow">http://blog.mazedlx.net/tags?term=asd</a>'. This request has been blocked; the content must be served over HTTPS.</p>
  </blockquote>
  
  <pre><code>$('#tags_id').select2({
      minimumInputLength: 2,
      tags: true,
      tokenSeparators: [','],
      ajax: {
          url: 'https://blog.mazedlx.net/tags/',
          type: 'GET',
          dataType: 'json',
          data: function (params) {
              var queryParameters = {
                  term: params.term
              }
              return queryParameters;
          },
          processResults: function (data) {
              return {
                  results: $.map(data, function (item) {
                      return {
                          text: item.tag,
                          id: item.id
                      };
                  })
              };
          }
      }
  });
  </code></pre>
  
  <p>As you can see in the fiddle the ajax url contains https, and the page containing the form is also served over https. The url also yields results: e.g. <a href="https://blog.mazedlx.net/tags?term=php" rel="nofollow">https://blog.mazedlx.net/tags?term=php</a>. What am I doing wrong?</p>