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

cors: support cross-site access to socket.io #131

Merged
merged 1 commit into from
May 8, 2021

Conversation

tve
Copy link

@tve tve commented May 6, 2021

A description of the changes proposed in the pull request and why

This PR enables cross-site access to uibuilder, for example so one can serve the front-end UI code from a standard javascript dev server running on one's laptop, such as using vue-cli-service serve. By default socket.io allows cross-site access, however, uibuilder sends an x-clientid custom header which must be explicitly included in the CORS preflight response. IMHO this PR does not reduce security because cross-site access was already allowed, it just didn't work out of the box: an attacker could have simply dropped the x-clientid header to get through.

Environment used for development and testing

Software Version
Node.JS v12.22.1
npm
Node-RED v1.3.4
uibuilder node v3.2.1
uibuilderFE v3.2.1
OS linux
Browser chrome

@TotallyInformation TotallyInformation merged commit 192f9bc into TotallyInformation:main May 8, 2021
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

Successfully merging this pull request may close these issues.

2 participants