forked from Mirrors/keyoxide-web
Fix module state detection
This commit is contained in:
parent
751e141f91
commit
67308487b9
2 changed files with 4 additions and 5 deletions
|
@ -33,11 +33,11 @@ import proxyGetApiRouter from './proxy_get.js'
|
||||||
|
|
||||||
const router = express.Router()
|
const router = express.Router()
|
||||||
|
|
||||||
if (process.env.ENABLE_MAIN_MODULE === 'true') {
|
if ((process.env.ENABLE_MAIN_MODULE ?? 'true') === 'true') {
|
||||||
router.use('/profile', keyoxideProfileApiRouter)
|
router.use('/profile', keyoxideProfileApiRouter)
|
||||||
}
|
}
|
||||||
console.log(process.env.ENABLE_PROXY_MODULE);
|
|
||||||
if (process.env.ENABLE_PROXY_MODULE === 'true') {
|
if ((process.env.ENABLE_PROXY_MODULE ?? 'true') === 'true') {
|
||||||
router.use('/get', proxyGetApiRouter)
|
router.use('/get', proxyGetApiRouter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,8 +73,7 @@ app.use(stringReplace({
|
||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
app.use('/api', apiRoute)
|
app.use('/api', apiRoute)
|
||||||
if (process.env.ENABLE_MAIN_MODULE === 'true') {
|
if ((process.env.ENABLE_MAIN_MODULE ?? 'true') === 'true') {
|
||||||
console.log("lol", process.env.ENABLE_MAIN_MODULES);
|
|
||||||
app.use('/favicon.svg', express.static('./static/favicon.svg'))
|
app.use('/favicon.svg', express.static('./static/favicon.svg'))
|
||||||
app.use('/robots.txt', express.static('./static/robots.txt'))
|
app.use('/robots.txt', express.static('./static/robots.txt'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue