How to use the conf/local.js.contextPath function in conf

To help you get started, we’ve selected a few conf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github First-Peoples-Cultural-Council / fv-web-ui / frontend / app / assets / javascripts / views / AppFrontController.js View on Github external
_getInitialState() {
    let routes = Immutable.fromJS(ConfRoutes)
    const contextPath = ConfGlobal.contextPath.split('/').filter((v) => v !== '')

    // Add context path to PATH and ALIAS properties if it is set (usually applies in DEV environment)
    if (contextPath && contextPath.length > 0) {
      routes = routes.map((route) => {
        let newRoute = route.set('path', List(contextPath).concat(route.get('path')))
        newRoute = newRoute.set('alias', List(contextPath).concat(route.get('alias')))
        return newRoute
      })
    }

    return {
      routes,
      warningsDismissed: false,
    }
  }
github First-Peoples-Cultural-Council / fv-web-ui / frontend / app / assets / javascripts / common / NavigationHelpers.js View on Github external
const ContextPath = () => {
  if (ENV_CONTEXT_PATH !== null && typeof ENV_CONTEXT_PATH !== 'undefined') {
    return ENV_CONTEXT_PATH
  } else if (!ConfGlobal.contextPath || ConfGlobal.contextPath.length === 0) {
    return ''
  }

  return ConfGlobal.contextPath
}