0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/server/web/shared/middlewares
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
validation
admin-redirects.js 🔒 Added admin:redirects config option for disabling admin redirects 2019-09-12 12:40:12 +01:00
brute.js
cache-control.js
custom-redirects.js Updated docs api links to be version-less 2019-07-25 15:17:23 +08:00
emit-events.js
error-handler.js Marked code property for removal in Ghost 4.0 2019-09-19 12:15:17 +02:00
ghost-locals.js
index.js Merge branch 'master' into v3 2019-10-08 13:58:08 +01:00
labs.js Removed subscribers from the codebase (#11153) 2019-10-09 11:47:04 +02:00
log-request.js Improved x-request-id handling 2019-09-22 18:23:45 +01:00
maintenance.js
pretty-urls.js
request-id.js Improved x-request-id handling 2019-09-22 18:23:45 +01:00
serve-favicon.js
serve-public-file.js 🔥 Removed v0.1 controllers & routes (#11103) 2019-09-11 19:10:10 +02:00
static-theme.js
uncapitalise.js Reworded confusing comment mentioning v0.1 2019-09-12 19:17:35 +02:00
update-user-last-seen.js
upload.js
url-redirects.js 🐛 Fixed 404s when using a proxy setup (#11269) 2019-10-28 11:22:05 +00:00