mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Merge pull request #2048 from gimelfarb/fix-1837-errpages-when-force-admin-ssl
This commit is contained in:
commit
604c6e307f
1 changed files with 6 additions and 3 deletions
|
@ -227,13 +227,16 @@ module.exports = function (server, dbHash) {
|
|||
// First determine whether we're serving admin or theme content
|
||||
expressServer.use(manageAdminAndTheme);
|
||||
|
||||
// Force SSL
|
||||
expressServer.use(checkSSL);
|
||||
|
||||
|
||||
// Admin only config
|
||||
expressServer.use(subdir + '/ghost', middleware.whenEnabled('admin', express['static'](path.join(corePath, '/client/assets'), {maxAge: ONE_YEAR_MS})));
|
||||
|
||||
// Force SSL
|
||||
// NOTE: Importantly this is _after_ the check above for admin-theme static resources,
|
||||
// which do not need HTTPS. In fact, if HTTPS is forced on them, then 404 page might
|
||||
// not display properly when HTTPS is not available!
|
||||
expressServer.use(checkSSL);
|
||||
|
||||
// Theme only config
|
||||
expressServer.use(subdir, middleware.whenEnabled(expressServer.get('activeTheme'), middleware.staticTheme()));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue