Skip to content

... #4022

Answered by darrachequesne
gillerby asked this question in Q&A
... #4022
Jul 14, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

If your website is located at site.net/chat, you need to customize the path option on the client side:

<script src="https://cdn.socket.io/4.1.3/socket.io.js"></script>
<script>
  var socket = io({
    path: "/chat/socket.io"
  });
</script>

Reference: https://socket.io/docs/v4/client-initialization/#path

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@darrachequesne
Comment options

@darrachequesne
Comment options

Answer selected by darrachequesne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
bug Something isn't working
2 participants
Converted from issue

This discussion was converted from issue #4020 on July 14, 2021 23:24.