Creating Simple Routes

This section describes how to create a simple route in the freeform designer, and add a chain and a filter. For examples of routes created with the freeform designer that can be tested with the examples in the Gateway Guide, see Example Routes Created With Freeform Designer.

Create a Simple Route
  1. In IG Studio, create a route:

    1. Go to http://openig.example.com:8080/openig/studio, and select Create a route.

    2. Select Freeform to use the freeform designer.

  2. Select Basic to create a route from a blank template.

  3. Enter a URL for the application you want to protect, followed by a path condition to access the route. For example, enter http://app.example.com:8081/my-basic-route.

    The route is displayed on the Flow tab of the canvas.

  4. On the top-right of the screen, select and Display to review the route.

    {
      "name": "my-basic-route",
      "baseURI": "http://app.example.com:8081",
      "condition": "${matches(request.uri.path, '^/my-basic-route')}",
      "handler": "ReverseProxyHandler",
      "heap": [
        {
          "name": "ReverseProxyHandler",
          "type": "ReverseProxyHandler"
        },
        {
          "type": "BaseUriDecorator",
          "name": "baseUri"
        },
        {
          "type": "TimerDecorator",
          "name": "timer",
          "config": {
            "timeUnit": "ms"
          }
        },
        {
          "type": "CaptureDecorator",
          "name": "capture",
          "config": {
            "captureEntity": false,
            "captureContext": false,
            "maxEntityLength": 524288
          }
        }
      ]
    }
  5. Add a filter to the route:

    1. Select the Flow tab, and delete the connector between Start and ReverseProxyHandler.

    2. From the side bar, drag a Chain onto the canvas, and then drag a filter into the chain.


      A menu for the filter opens. Enter the required configuration properties, and then save.

  6. Connect Start to Chain-1, and Chain-1 to ReverseProxyHandler.


  7. Decorate objects in the route:

    1. Select the All Objects tab to view a list of objects in the route. By default, all available decorators are included in the route heap but do not decorate any objects.

    2. For the ReverseProxyHandler or filter, select , select the Decorations tab, and then enable one or more of the decorators.

  8. On the top-right of the screen, select and Display to review the route.

Read a different version of :