Leafpub/leafpub

Requesting Content over SSL behind Proxy

gdbjohnson opened this issue · 4 comments

Running version 1.0.0-beta7 in a docker container behind an nginx reverse proxy that requires SSL. Is there a way to achieve this with Leafpub? Currently, the links are being generated as http, and I'm getting mixed content errors, and none of my linked content is loading.

Wordpress has SSL fixers that will force content to be generated as https. Looking for a similar solution.

  • Leafpub version: 1.0.0-beta7
  • PHP version: 7
  • Affected browsers: all
  • Operating system: custom docker file based on php:7.0.22-fpm-alpine, behind nginx reverse proxy

if you want to see the issue directly:

http://blog.unyozi.ca/
vs:
https://blog.unyozi.ca/

Sorry for the late response.
Your server redirects to https automatically.
If you request Leafpub without SSL it will return the url without https.

I was able to hack it by modifying the PHP code around the scheme, forcing it to be https. It hurt me a bit to have to do it. I might fork the project and solve it better so others can enjoy.

Now I'm faced with URL rewriting, which is along the same issue.

I'd be interested in seeing a baked-in option to force ssl for everything.

@trentyarwood @gdbjohnson
I released beta7 at the moment.
I added an option to force https urls 🙂