Give Origins without a port number#633
Closed
nambad wants to merge 3 commits intosocketio:masterfrom
nambad:master
Closed
Give Origins without a port number#633nambad wants to merge 3 commits intosocketio:masterfrom nambad:master
nambad wants to merge 3 commits intosocketio:masterfrom
nambad:master
Conversation
Added
if(!parts.port)
{
parts.port = 80;
}
if(!parts.port)
{
parts.port = 80;
}
if(!parts.port)
{
parts.port = 80;
}
Contributor
|
Rather than this pull request, I suggest you either start or comment on an issue, with a test case that captures the unwanted behavior you're currently seeing. Based on that someone will get back to how to best fix it. |
Author
|
#638 |
darrachequesne
pushed a commit
that referenced
this pull request
Jul 4, 2024
Fix undefined packet type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ok... After lot of problems and research, I realized that in the concept of origins, http://localhost is not equal to http://localhost:80
When used 'localhost' in origins, it would always give invalid origin as parts.port was always undefined. To solve this i added the below 3 lines of code
in the files
lib/manager.js
lib/transports/websocket/hybi-07-12.js
lib/transports/websocket/hybi-16.js
lib/transports/websocket/hybi-17.js
Make sure in configuration, origin parameter, one needs to enter "localhost:80"