0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Reworked the collections killswitch to always override labs

refs https://github.com/TryGhost/Arch/issues/95

- We are releasing with a slight risk of failing over, so need a switch to allow disabling collections on hosted environment.
This commit is contained in:
Naz 2023-09-22 15:27:42 +08:00 committed by naz
parent ca6ee41806
commit 1fecb08957
2 changed files with 7 additions and 3 deletions

View file

@ -34,8 +34,12 @@ class CollectionsServiceWrapper {
const config = require('../../../shared/config');
const labs = require('../../../shared/labs');
// host setting OR labs "collections" flag has to be enabled to run collections service
if (config.get('hostSettings:collections:enabled') || labs.isSet('collections')) {
// CASE: emergency kill switch in case we need to disable collections outside of labs
if (config.get('hostSettings:collections:enabled') === false) {
return;
}
if (labs.isSet('collections')) {
if (inited) {
return;
}

View file

@ -758,7 +758,7 @@ exports[`Settings API Edit Can edit a setting 2: [headers] 1`] = `
Object {
"access-control-allow-origin": "http://127.0.0.1:2369",
"cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
"content-length": "4234",
"content-length": "4255",
"content-type": "application/json; charset=utf-8",
"content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/,
"etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,