Workaround If URL Rewriting Fails

The format and protocols in a WebSocket connection are not visible to Access Manager and hence it cannot change the protocols.

Some WebSocket applications dynamically frame the WebSocket URI, such as or from the previous response (other than HTML) and interrupts the connection. In such cases, rewriting the URL might not function properly.

For example, if you have configured a proxy service that protects the backend WebSocket application as a Path Based Multi-Homing service and if you have selected the Remove Path on Fill option, the WebSocket application can fail.

Perform the following steps if URL rewriting fails:

  1. Create a character profile to replace the path (path used to frame next request) in the response with the configured path appended before.

  2. Delete the text/html content-type under the And Document Content-Type Header Is section.

For example, If the path configured in proxy service is /test and Remove Path on Fill is selected, the ws URI will be similar to

In this scenario, you must create a character rewriter profile to Search for the string /socket.io and replace with /test/socket.io.

In case of request framing from HTML response, character profile is not required.

NOTE:Content rewriting is not supported after a WebSocket connection is established.