fix(ci): community template disabled in setup
This commit is contained in:
@@ -78,7 +78,7 @@ export default async function({log = true, sandbox = false, community = {}} = {}
|
|||||||
logger("metrics/setup > load package.json > success")
|
logger("metrics/setup > load package.json > success")
|
||||||
|
|
||||||
//Load community templates
|
//Load community templates
|
||||||
if ((conf.settings.extras?.features?.includes("metrics.setup.community.templates")) || (conf.settings.extras?.features === true) || (conf.settings.extras?.default)) {
|
if ((conf.settings.extras?.features?.includes("metrics.setup.community.templates")) || (conf.settings.extras?.features === true) || (conf.settings.extras?.default) || (sandbox)) {
|
||||||
if ((typeof conf.settings.community.templates === "string") && (conf.settings.community.templates.length)) {
|
if ((typeof conf.settings.community.templates === "string") && (conf.settings.community.templates.length)) {
|
||||||
logger("metrics/setup > parsing community templates list")
|
logger("metrics/setup > parsing community templates list")
|
||||||
conf.settings.community.templates = [...new Set([...decodeURIComponent(conf.settings.community.templates).split(",").map(v => v.trim().toLocaleLowerCase()).filter(v => v)])]
|
conf.settings.community.templates = [...new Set([...decodeURIComponent(conf.settings.community.templates).split(",").map(v => v.trim().toLocaleLowerCase()).filter(v => v)])]
|
||||||
|
|||||||
@@ -400,9 +400,9 @@ export default async function({sandbox = false} = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Control endpoints
|
//Control endpoints
|
||||||
if ((conf.settings.control?.token) && (conf.settings.control.token)) {
|
if (conf.settings.control?.token) {
|
||||||
const middleware = (req, res, next) => {
|
const middleware = (req, res, next) => {
|
||||||
console.log(`metrics/app/control > ${req.method} > ${req.url}`)
|
console.log(`metrics/app/control > ${req.url.replace(/[\n\r]/g, "")}`)
|
||||||
if (req.headers.authorization === conf.settings.control.token) {
|
if (req.headers.authorization === conf.settings.control.token) {
|
||||||
next()
|
next()
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user