Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dots in URL Mapping's prefix section #121

Open
Jiron opened this issue Apr 10, 2024 · 1 comment
Open

Allow dots in URL Mapping's prefix section #121

Jiron opened this issue Apr 10, 2024 · 1 comment

Comments

@Jiron
Copy link

Jiron commented Apr 10, 2024

You can't add dots in the prefix path. When trying to map socket.io for example, this will cause some trouble. You will have to change the path on where socket.io runs on your server to a path which does not include a dot, for example /socketio. I did it like so:

const io = new Server(server, {
    path: '/socketio'
});

What's weird is that dots are allowed in the "target" section, so I could route it to lets say somerandomurl.com/socket.io, but you can't add dots in the "prefix" section.
When adding a dot in the "prefix" section, you'll just be hit with an error:

image

In my opinion, it would be great to just allow it as I do not see what could cause issues with it. Socket.io uses /socket.io as the default path so it's just one extra step you have to think about when working with activities.

Next to that the error isn't really descriptive. Took me a second to understand that the dot was the issue.

@matthova
Copy link
Collaborator

While the workaround is simple (just remap it to socketio) I appreciate that this will be a common painpoint. Plus /socket.io is a valid url path. Thanks for flagging. We'll see if there's a path forward

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants