0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/web/shared/middlewares
Kevin Ansfield 830610d243 Fixed serving of binary public files
no issue

- serving of our public asset images was broken
  - we were reading the binary file in as a string so we could do url transforms, this meant data was lost/corrupted and browsers could not display the served data
  - we were using the wrong mime-type for pngs which meant browsers were triggering downloads rather than displaying images (at least when accessed directly)
- updates uses of `servePublicFile` to have the correct png mimetype
- adjusts `servePublicFile` to treat any mime type starting with `image` as a binary file, passing the file directly through express using `res.sendFile` and skipping the in-memory content caching which is mostly only useful for text files with URL transforms
2020-02-10 09:51:32 +00:00
..
api
image Handled missing file extensions for resized image requests 2020-02-04 08:04:22 +00:00
validation
admin-redirects.js
brute.js
cache-control.js
custom-redirects.js
emit-events.js
error-handler.js
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
maintenance.js
pretty-urls.js
request-id.js
serve-favicon.js
serve-public-file.js Fixed serving of binary public files 2020-02-10 09:51:32 +00:00
static-theme.js
uncapitalise.js
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