Proxy for WebSocket Traffic in Structured Editor
This section describes how to set up IG to proxy WebSocket traffic, in the structured editor of Studio. For more information about how to set up proxying for WebSocket traffic, see Proxying WebSocket Traffic.
In IG Studio, create a route:
Go to http://openig.example.com:8080/openig/studio, and select Create a route.
Select Structured to use the structured editor.
Select Advanced options on the right, and create a route with the following options:
Base URI:
http://app.example.com:8081
Condition: Path:
/websocket-se
Name:
websocket-se
Enable WebSocket: Select this option
Configure authentication:
Select Authentication.
Select Single Sign-On, and enter the following information:
AM service:
URI:
http://openam.example.com:8088/openam
Version: The version of the AM instance, for example,
7
.Agent: The credentials of the Java agent you created in AM.
Username:
ig_agent
Password:
password
Leave all other values as default.
On the top-right of the screen, select and Display to review the route.
The following route should be displayed:
{ "name": "websocket-se", "baseURI": "http://app.example.com:8081", "condition": "${matches(request.uri.path, '^/websocket-se')}", "heap": [ { "name": "AmService-1", "type": "AmService", "config": { "url": "http://openam.example.com:8088/openam", "realm": "/", "version": "7", "agent": { "username": "ig_agent", "password": "password" }, "sessionCache": { "enabled": false } } }, { "name": "ReverseProxyHandler", "type": "ReverseProxyHandler", "config": { "websocket": { "enabled": true } } } ], "handler": { "type": "Chain", "config": { "filters": [ { "name": "SingleSignOnFilter-1", "type": "SingleSignOnFilter", "config": { "amService": "AmService-1" } } ], "handler": "ReverseProxyHandler" } } }
Select Deploy to push the route to the IG configuration.
You can check the
$HOME/.openig/config/routes
folder to see that the route is there.