1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add-on script not loading via HTTPS

Discussion in 'XenForo Development Discussions' started by CrispinP, Jun 25, 2016.

  1. CrispinP

    CrispinP Active Member

    Hi folks,

    I have an add-on which a user is having a problem with the js not loading via https:

    https://veganforum.co.uk/usermap

    There are not non-https calls on the page so the browser is happy.

    I have two lines of code, the top one works fine, the bottom one does not.

    Code:
    <script type="text/javascript" src="//googlemaps.github.io/js-marker-clusterer/src/markerclusterer.js"></script>
    <script type="text/javascript" src="//jawj.github.com/OverlappingMarkerSpiderfier/bin/oms.min.js"></script>
    
    In chrome source, when clicking on the top one if loads via https but the bottom one loads via http. when forcing the bottom one to https it is happy.


    I've got a few users using this and not had this problem before. Don't understand why it is happening.


    thanks
    Crispin
     
  2. Thomas.B

    Thomas.B Well-Known Member

    The second URL is always redirected to a non-secure site. If you replace „github.com“ with „github.io“ it should work.
     
  3. CrispinP

    CrispinP Active Member

    Ah OK, thanks. But why when I explicitly say https it's OK?

    I've resorted to keeping the file local - perhaps it's rude to link to guthub. :)
     
  4. Thomas.B

    Thomas.B Well-Known Member

    CrispinP likes this.
  5. CrispinP

    CrispinP Active Member

    Ah, cool. Thanks for the help
     

Share This Page