Leafpub / leafpub

Simple, beautiful, open source publishing.
GNU General Public License v3.0
646 stars 74 forks source link

Requesting Content over SSL behind Proxy #128

Closed gdbjohnson closed 6 years ago

gdbjohnson commented 6 years ago

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.

if you want to see the issue directly:

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

karsasmus commented 6 years ago

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

gdbjohnson commented 6 years ago

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.

trentyarwood commented 6 years ago

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

karsasmus commented 6 years ago

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