0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/test/unit/web/middleware
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
..
api Removed all clients and client_trusted_domains related code 2019-09-12 15:09:49 +01:00
image Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
cache-control_spec.js Bumped sinon from 4.4.6 to 7.3.2 (#10400) 2019-01-21 17:53:44 +01:00
ghost-locals_spec.js Removed confusing use of v0.1 in theme handler test 2019-09-18 10:27:23 +02:00
request-id_spec.js Added tests for x-request-id handling 2019-09-23 07:34:59 +01:00
serve-favicon_spec.js Fixed test for updated favicon 2019-10-17 13:20:09 +07:00
serve-public-file_spec.js Bumped sinon from 4.4.6 to 7.3.2 (#10400) 2019-01-21 17:53:44 +01:00
static-theme_spec.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
theme-handler_spec.js
uncapitalise_spec.js 💡Added v3 API endpoint (#11073) 2019-09-03 12:33:31 +05:30
update-user-last-seen_spec.js Bumped sinon from 4.4.6 to 7.3.2 (#10400) 2019-01-21 17:53:44 +01:00
url-redirects_spec.js 🐛 Fixed 404s when using a proxy setup (#11269) 2019-10-28 11:22:05 +00:00