diff --git a/modules/functions/serveAuth.js b/modules/functions/serveAuth.js index bfc6422..35e54df 100644 --- a/modules/functions/serveAuth.js +++ b/modules/functions/serveAuth.js @@ -4,9 +4,7 @@ import cors from 'cors'; import userToken from '../middleware/userToken'; import showAuth from '../actions/showAuth'; -const app = express(); - -app.disable('x-powered-by'); +const app = express.Router(); app.use(cors()); app.use(userToken); diff --git a/modules/functions/serveMainPage.js b/modules/functions/serveMainPage.js index 9b59250..e1f2aaf 100644 --- a/modules/functions/serveMainPage.js +++ b/modules/functions/serveMainPage.js @@ -2,9 +2,8 @@ import express from 'express'; import serveMainPage from '../actions/serveMainPage'; -const app = express(); +const app = express.Router(); -app.disable('x-powered-by'); app.use(serveMainPage); export default app; diff --git a/modules/functions/serveNpmPackageFile.js b/modules/functions/serveNpmPackageFile.js index d928c6a..35da72d 100644 --- a/modules/functions/serveNpmPackageFile.js +++ b/modules/functions/serveNpmPackageFile.js @@ -10,9 +10,7 @@ import validatePackageName from '../middleware/validatePackageName'; import validateQuery from '../middleware/validateQuery'; import serveFile from '../actions/serveFile'; -const app = express(); - -app.disable('x-powered-by'); +const app = express.Router(); app.use(cors()); app.use(redirectLegacyURLs); diff --git a/modules/functions/servePublicKey.js b/modules/functions/servePublicKey.js index f963004..5deff2a 100644 --- a/modules/functions/servePublicKey.js +++ b/modules/functions/servePublicKey.js @@ -3,9 +3,7 @@ import cors from 'cors'; import showPublicKey from '../actions/showPublicKey'; -const app = express(); - -app.disable('x-powered-by'); +const app = express.Router(); app.use(cors()); app.use(showPublicKey); diff --git a/modules/functions/serveStats.js b/modules/functions/serveStats.js index c85ad69..5ce621e 100644 --- a/modules/functions/serveStats.js +++ b/modules/functions/serveStats.js @@ -3,9 +3,7 @@ import cors from 'cors'; import showStats from '../actions/showStats'; -const app = express(); - -app.disable('x-powered-by'); +const app = express.Router(); app.use(cors()); app.use(showStats);