Ghost/core/server/utils
Hannah Wolfe 59e2694acf Misc Middleware cleanup (#7526)
* 💄 Combine slashes & uncapitalise middleware

- these bits of middleware belong together
- ideally they should be optimised

* 🎨 Move ghostLocals out of themeHandler

GhostLocals sets several important values which are needed for every part of the application,
admin, api and theme. Therefore, it doesn't make sense for it to be bundled in the themeHandler.

* 🐛 Fix the uncapitalise middleware

- Updated to make correct use of req.baseUrl, req.path, req.url & req.originalUrl
- Updated the tests to actually cover our weird cases

* 🎨 Move ghostVersion logic out of config

* 💄 Group static / asset-related middleware together

* 🔥 Remove /shared/ asset handling

- The 5 files which are located in `/shared/` are all handled by individual calls to `serveSharedFile`
- Therefore this code is redundant
2016-10-10 21:14:32 +02:00
..
asset-hash.js 🐛 Refresh assetHash on theme override (#7430) 2016-09-23 13:05:44 +02:00
cached-image-size-from-url.js [FEATURE] AMP (#7229) 2016-08-22 18:49:27 +02:00
downzero.js Add jscs task to grunt file and clean up files to adhere to jscs rules. 2014-09-17 21:44:29 -04:00
ghost-version.js Misc Middleware cleanup (#7526) 2016-10-10 21:14:32 +02:00
gravatar.js Refactor gravatarLookup, remove request dependency 2016-02-16 11:12:01 +00:00
image-size-from-url.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
index.js 🐛 Refresh assetHash on theme override (#7430) 2016-09-23 13:05:44 +02:00
labs.js 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
make-absolute-urls.js 🎨 source out url utils from ConfigManager (#7347) 2016-09-20 15:59:34 +01:00
parse-package-json.js Harvest server side strings 2015-12-19 12:12:16 +01:00
pipeline.js Pipeline util tests, clean & fix 2015-11-03 09:14:44 +00:00
read-csv.js Add CSV parser for csv read utility 2016-06-07 10:47:56 +01:00
read-directory.js Add .git folder to ignore folders list 2015-12-01 21:14:23 +02:00
read-themes.js Add readThemes() utility to get a list of themes 2015-10-13 15:54:41 +02:00
remove-open-redirect-from-url.js Remove open redirect by removing double slashes from redirects (#7247) 2016-08-23 13:47:59 +02:00
sequence.js post-scheduling 2016-06-14 10:52:13 +02:00
social-urls.js Add helpers for facebook & twitter urls 2016-05-17 16:39:58 +01:00
url.js 🎨 change how we get and set config 2016-09-20 15:59:34 +01:00
visibility-filter.js Move internal tags out of labs (#7519) 2016-10-10 09:51:03 +01:00
zip-folder.js Use node-archiver to create zips (#7268) 2016-08-25 09:22:22 +02:00