export interface ActualProxyServerConfig { url : string ; } export interface DisabledProxyServerConfig { enabled : boolean ; } export type ProxyServerConfig = DisabledProxyServerConfig | ActualProxyServerConfig ; export function isDisabled ( _config ) { const config = _config as DisabledProxyServerConfig ; return config && config . enabled === false ; } export function defaultConfig ( ) { return { proxyServer : { enabled : false } } ; } export function config ( ) { return import ( '@kui-shell/client/config.d/proxy.json' ) . catch ( ( ) => { console . log ( 'using default proxy configuration' ) ; return defaultConfig ( ) ; } ) ; }