mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Removed unused admin serviceworker endpoint
no issue - Ghost-Admin serviceworker support was removed a long time ago but the URL handling was never removed
This commit is contained in:
parent
548ed8b851
commit
bc18aee3b4
2 changed files with 0 additions and 18 deletions
|
@ -19,9 +19,6 @@ module.exports = function setupAdminApp() {
|
|||
{maxAge: (configMaxAge || configMaxAge === 0) ? configMaxAge : constants.ONE_YEAR_MS, fallthrough: false}
|
||||
));
|
||||
|
||||
// Service Worker for offline support
|
||||
adminApp.get(/^\/(sw.js|sw-registration.js)$/, require('./serviceworker'));
|
||||
|
||||
// Ember CLI's live-reload script
|
||||
if (config.get('env') === 'development') {
|
||||
adminApp.get('/ember-cli-live-reload.js', function emberLiveReload(req, res) {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
const debug = require('ghost-ignition').debug('web:admin:serviceworker');
|
||||
const path = require('path');
|
||||
|
||||
// Route: index
|
||||
// Path: /ghost/sw.js|sw-registration.js
|
||||
// Method: GET
|
||||
module.exports = function adminController(req, res) {
|
||||
debug('serviceworker called');
|
||||
|
||||
const sw = path.join(__dirname, '..', '..', '..', 'built', 'assets', 'sw.js'),
|
||||
swr = path.join(__dirname, '..', '..', '..', 'built', 'assets', 'sw-registration.js'),
|
||||
fileToSend = req.url === '/sw.js' ? sw : swr;
|
||||
|
||||
res.sendFile(fileToSend);
|
||||
};
|
Loading…
Add table
Reference in a new issue