From 0de2c7e2613c28d556e9b93de06b6c31e4ffb019 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Tue, 4 Jan 2022 14:56:07 +0000 Subject: [PATCH] Removed `filesAPI` GA labs flag refs https://github.com/TryGhost/Team/issues/1258 - files API is GA so labs flag and conditional access to files API routes is no longer necessary --- core/frontend/web/site.js | 2 +- core/server/web/api/canary/admin/routes.js | 1 - core/shared/labs.js | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/frontend/web/site.js b/core/frontend/web/site.js index 72401409d9..dc6ecaa743 100644 --- a/core/frontend/web/site.js +++ b/core/frontend/web/site.js @@ -120,7 +120,7 @@ module.exports = function setupSiteApp(options = {}) { // Serve blog media using the storage adapter siteApp.use(STATIC_MEDIA_URL_PREFIX, storage.getStorage('media').serve()); // Serve blog files using the storage adapter - siteApp.use(STATIC_FILES_URL_PREFIX, labs.enabledMiddleware('filesAPI'), storage.getStorage('files').serve()); + siteApp.use(STATIC_FILES_URL_PREFIX, storage.getStorage('files').serve()); // Global handling for member session, ensures a member is logged in to the frontend siteApp.use(membersService.middleware.loadMemberSession); diff --git a/core/server/web/api/canary/admin/routes.js b/core/server/web/api/canary/admin/routes.js index 275c4db856..79a089d711 100644 --- a/core/server/web/api/canary/admin/routes.js +++ b/core/server/web/api/canary/admin/routes.js @@ -252,7 +252,6 @@ module.exports = function apiRoutes() { // ## files router.post('/files/upload', - labs.enabledMiddleware('filesAPI'), mw.authAdminApi, apiMw.upload.single('file'), http(api.files.upload) diff --git a/core/shared/labs.js b/core/shared/labs.js index 99d623f56b..0ca5042c8c 100644 --- a/core/shared/labs.js +++ b/core/shared/labs.js @@ -15,7 +15,6 @@ const messages = { // flags in this list always return `true`, allows quick global enable prior to full flag removal const GA_FEATURES = [ - 'filesAPI', 'fileCard', 'headerCard' ];