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 Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
validation Changed error type for missing file in /uploads 2019-02-14 20:52:51 +00:00
admin-redirects.js 🔒 Added admin:redirects config option for disabling admin redirects 2019-09-12 12:40:12 +01:00
brute.js Added brute protection to content api (#10343) 2019-01-07 20:03:46 +07:00
cache-control.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
custom-redirects.js Updated docs api links to be version-less 2019-07-25 15:17:23 +08:00
emit-events.js Added new site.changed event and webhook trigger service (#10019) 2018-10-19 00:01:30 +05:30
error-handler.js Marked code property for removal in Ghost 4.0 2019-09-19 12:15:17 +02:00
ghost-locals.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
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 Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
pretty-urls.js Refactored web/middleware and web/utils to web/shared (#9892) 2018-09-20 20:04:34 +02:00
request-id.js Improved x-request-id handling 2019-09-22 18:23:45 +01:00
serve-favicon.js Migrated to use url-utils from Ghost-SDK (#10787) 2019-06-18 15:13:55 +02:00
serve-public-file.js 🔥 Removed v0.1 controllers & routes (#11103) 2019-09-11 19:10:10 +02:00
static-theme.js Extracted frontend folder (#10780) 2019-06-19 11:30:28 +02:00
uncapitalise.js Reworded confusing comment mentioning v0.1 2019-09-12 19:17:35 +02:00
update-user-last-seen.js 🐛 Fix last seen for users (#10141) 2018-11-13 18:27:10 +07:00
upload.js 🐛 Fixed files staying in temp directory after upload is done 2019-01-30 09:24:29 +00:00
url-redirects.js 🐛 Fixed 404s when using a proxy setup (#11269) 2019-10-28 11:22:05 +00:00