0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Fixed urls in output when accessing front-end via https

no issue

- `vhost` as used in b46f9b1dc2 does not pass down the `trust proxy` setting to child apps so it's required to be called explicitly in each child app
- fixed URLs being output as http:// instead of https:// when the front-end is accessed with `x-forwarded-proto: 'https'`
This commit is contained in:
Kevin Ansfield 2019-09-11 14:50:28 +01:00
parent 4876f5fc13
commit 5fc101136f

View file

@ -64,6 +64,11 @@ module.exports = function setupSiteApp(options = {}) {
const siteApp = express();
// Make sure 'req.secure' is valid for proxied requests
// (X-Forwarded-Proto header will be checked, if present)
// NB: required here because it's not passed down via vhost
siteApp.enable('trust proxy');
// ## App - specific code
// set the view engine
siteApp.set('view engine', 'hbs');