title: How can I redirect to another server's web socket?
body: <p>I am currently building a chat server using Rust. I tried to authenticate with the user's digest token that existed in the existing postgresql, but it failed because of the openssl problem. Therefore, I would like to authenticate the user through the existing django authentication authority, and when authentication is successful, I would like to redirect it to the rust chat server to make the service available.</p>
  <p><a href="https://i.stack.imgur.com/y4Os9.png" rel="nofollow noreferrer">My composition</a></p>
  <pre class="lang-py prettyprint-override"><code>async def redirect(websocket: WebSocket, *args, **kwargs):
      await websocket.accept()
      return Response(status=HTTP_301_MOVED_PERMANENTLY)
  </code></pre>
  <p>I tried redirecting from django to websocket, but failed.</p>
  <p>How can I authenticate with django and get access to the rust websocket server? I would appreciate it if you could let me know if there is a better way than redirect. If I have to redirect, I would appreciate it if you could tell me how to redirect. I googled hard, but I didn't find anything out.</p>