chipsenkbeil / grid-side

Personal portfolio and blog for use by the Hugo generator.
MIT License
32 stars 21 forks source link

Infinite scroll fails when site is https #27

Open mattstratton opened 8 years ago

mattstratton commented 8 years ago

My site at https://www.mattstratton.com enforces SSL on all url's. The infinite scroll feature doesn't work, as it tries to load an endpoint over http.

GH URL is https://github.com/mattstratton/mattstratton-web

I have the baseurl set at https://www.mattstratton.com, but it doesn't seem to take that in.

Mixed Content: The page at 'https://www.mattstratton.com/post/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://www.mattstratton.com/post/page/2/'. This request has been blocked; the content must be served over HTTPS.
chipsenkbeil commented 8 years ago

I don't have enough blog content for multiple pages under the post section, but I have enough for projects and gallery. When I look at my network requests when scrolling, infinite scroll uses HTTPS as I would expect. Did you make sure to set your base url to have https instead of http in front (e.g. this)? Infinite scroll is set up to use the pagination urls for content retrieval and Hugo should inject https instead of http for your navigation buttons.

My site uses cloudflare to provide HTTPS on top of my Github pages hosting: https://chipsenkbeil.com

I did notice that I'm not updating the search navigation (via duckduckgo) to use HTTPS, but that is a separate issue.

chipsenkbeil commented 8 years ago

Looks like you are. Next step would be to disable infinite scroll from the configuration and see if your pagination links are generated using https. If they are, digging into how infinite scroll parses their links and uses them would be the next step.

mattstratton commented 8 years ago

Hmm. I just tried disabling infinite scroll, and the pagination links definitely are using https.

Do you have the non-minimized version of jquery.infinitescroll.min.js available, or is that something you got from somewhere else?

chipsenkbeil commented 8 years ago

I got it from here.