Socket server behind the authkeeper proxy

I have a server which has REST API and Socketio WebSockets. I have put this server behind the proxy and set up a rule for REST API

Server URL:
Proxy URL:

and my rules are as follow:

    "id": "server-1",
    "description": "server -1 rest api",
    "match": {
        "methods": [
        "url": "<.*>"
    "authenticators": [
            "handler": "oauth2_introspection",
            "config": {}
    "authorizer": {
        "handler": "allow",
        "config": null
    "credentials_issuer": {
        "handler": "headers",
        "config": {
            "headers": {
                "auth-user": "{{ print .Subject }}"
    "upstream": {
        "preserve_host": true,
        "strip_path": "server1",
        "url": ""

But websocket connections use wss protocol and I have tried but unable to get any result.

So my question is how to work with websocket behind the oathkeeper proxy if it is possible and how to write rules and connect the client?

I’m also interested in the answer

I haven’t checked that. WSS still uses HTTP(S) thought right?

I found a golang issue which says it should be supported:

1 Like

This exactly worked!


  id: "websocket-test"
    preserve_host: true
    url: "http://websocket-test:8010"
    strip_path: /ws
    url: "<http|ws>://"
      - GET

Connection to ws:// worked

1 Like