Add required access policy

Create a policy that's required to turn a connection into a WebSocket.

Add access policy for each web socket URI:

  1. For the web socket application navigate to the Policies tab.
  2. Click Add () in the policy list header and choose Protected. See Policy types.
  3. Enter the following:
    FieldValue
    NameAn appropriate name for the policy such as WebSocket URI.
    Policy TypeProtected
    Resource PathURL to the web socket (for example /path/to/ws1).
  4. Expand Advanced.
  5. In the Custom Configuration text area enter the following code: proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
  6. Click Not validated to validate the code block. After being successfully validated, the label changes to Valid.
  7. Correct any errors. Click Okay to finalize the policy.
  8. Repeat for each web socket URI
  9. Click Done to complete the application.

Related topics

See WebSocket proxying for more information on NGINX support for WebSockets.