pedestal

hindol 2020-05-25T11:33:03.141100Z

I am in no way a WebSocket expert but I think the only opportunity to grab the HTTP(S) headers is during the WS upgrade request. Post that, I found no HTTP headers are available. One thing that helped me tremendously is this article on Heroku: https://devcenter.heroku.com/articles/websocket-security#authentication-authorization

hindol 2020-05-25T11:34:47.142300Z

Once a WS connection is established, I don't think you can leverage the interceptor model, at least not in a straight-forward way. I think that's designed for HTTP only.

adamfeldman 2020-05-25T14:58:33.142400Z

There might be something to reference in this code: https://github.com/ptaoussanis/sente

2020-05-25T21:08:54.142800Z

@jdkealy You can access to the upgrade request via the websocket session object. Check out the Jetty websocket api for details.