Skip to content

Configuration: Routes

gianlucafrei edited this page Dec 7, 2020 · 5 revisions

You can specify routes for your upstream servers in the Nelly configuration

Example:

routes:
  route1:
    type: webapplication
    path: /myservice/**
    url: https://backend.my/
    allowAnonymous: yes

Configuration

You can specify multiple routes under the routes property. You must specify a unique name for each route. It is recommended to use something meaningful like frontend, backend, or the name of the service.

type

The type property specifies the name of the Security Profile that is used for this route. You must set a valid security profile, you can either use a default one or define your own security profile.

path

The path setting specifies which requests to Nelly are routed with this route. In the upper example all requests to /myservice are routes to https://backend.my/. You can use ant-style patterns for routes:

  • /myservice/ matches only /myservice/
  • /myservice/* matches with one level wildcard, i.e. /myservice/foo
  • /myservice/** matches all hierarchical request, i.e. /myservice/foo/bar

url

The URL setting specifies the upstream service to which Nelly forwards the request. The path from the route will not be forwarded. For instance, if you call with the example before /myservice/foo Nelly forwards the request to https://backend.my/foo.

allowAnonymous

Boolean variable: If you specify no Nelly only allows authenticated requests to this route. This setting is useful if your backend application expects only authenticated users. Another use case for this option is if you want to secure a web service that has no authentication implemented. This method is then only secure if you specify only Login provider from private IdPs and not social logins.

Clone this wiki locally