mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
refactor(server): bootstrap and middleware read config via app-config
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
* Off by default — the generated spec enumerates every route including the
|
||||
* admin surface, so exposing it is an explicit self-hoster decision.
|
||||
*/
|
||||
import { readEnv } from '../../app-config';
|
||||
|
||||
export function apiDocsEnabled(): boolean {
|
||||
return (process.env.TREK_API_DOCS_ENABLED || '').trim().toLowerCase() === 'true';
|
||||
return readEnv().http.apiDocsEnabled;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user