typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

Add support for scheme-less base_url #401

Closed mahdi-ninja closed 11 months ago

mahdi-ninja commented 11 months ago

I'm utilizing a proxy that internally accesses Typemill using HTTP and externally exposes the site using HTTPS. However, Typemill mistakenly perceives the request as coming from 'http://example.com/' instead of the actual 'https://example.com/.' As a result, loading other resources like JavaScript, CSS, and XHR requests may trigger the mixed-content policy of browsers, leading to the blocking of these resources.

To address this issue, I have introduced an option to remove the scheme from the base_url which allows browsers to load resources without triggering the mixed-content policy. This option can be beneficial for others experiencing similar challenges with the mixed-content policy.

trendschau commented 11 months ago

Thank you, I will migrate this to version 2 of Typemill