Ghost/core/server/web/admin
Kevin Ansfield 7284227f1e
🐛 Fixed 404s when using a proxy setup (#11269)
no issue

When using certain proxy setups that result in `host` and `x-forwarded-host` being different, it became impossible to access Ghost because all routes showed generic 404 pages.

- `vhost` module that we are using to separate front-end and admin urls does not use express' `req.hostname` so it does not pick up the `x-forwarded-host` url that express' `'trust proxy'` config gives us
- switched to the forked `@tryghost/vhost-middleware` package which has a one-line change to use `req.hostname || req.host`
- added `'trust proxy'` config to the admin express app and switched to using `req.hostname` in our redirect code to avoid infinite redirect loops
2019-10-28 11:22:05 +00:00
..
views Moved apps into web folder (#9308) 2017-12-06 17:37:54 +01:00
app.js 🐛 Fixed 404s when using a proxy setup (#11269) 2019-10-28 11:22:05 +00:00
controller.js Added x-frame-options header to /ghost/ route (#10760) 2019-05-28 09:04:48 +01:00
index.js Moved apps into web folder (#9308) 2017-12-06 17:37:54 +01:00
middleware.js Migrated to use url-utils from Ghost-SDK (#10787) 2019-06-18 15:13:55 +02:00