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:
parent
4876f5fc13
commit
5fc101136f
1 changed files with 5 additions and 0 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue