Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gecBurton committed Oct 15, 2024
1 parent c2ce0ca commit 2cd9f53
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions django_app/redbox_app/redbox_core/views/chat_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@ def get(self, request: HttpRequest, chat_id: uuid.UUID | None = None) -> HttpRes
return redirect(reverse("chats"))
messages = ChatMessage.get_messages_ordered_by_citation_priority(chat_id)

logger.info("SERVER_NAME=%s", request.META["SERVER_NAME"])
logger.info("HOST=%s", request.get_host())

host, port = request.get_host().split(":")
host = request.get_host()
if ":" in host:
host = host.split(":")[0]

endpoint = URL.build(
scheme=settings.WEBSOCKET_SCHEME,
host=host,
port=int(port),
port=int(request.META["SERVER_PORT"]),
path=r"/ws/chat/",
)
logger.info("endpoint=%s", endpoint)
Expand Down

0 comments on commit 2cd9f53

Please sign in to comment.