add a RO websocket with no input handling #204
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.
Reference the issue numbers and reviewers
Closes #203
Explain relevant issues and how this pull request solves them
The goal here is to provide a mechanism to ensure a view-only connection, per issue #203 .
Currently, this is handled on the frontend, meaning as long as the websocket is open, it is possible to send keystrokes through.
Adding another endpoint allows for clean separation and smooth integration with reverse proxies/middlewares/auth setups out there.
This helps a use case where a user has got an established setup around that or wants to integrate with their platform - so custom auth middlewares can smoothly handle routing users between RW/RO endpoints.
Describe the changes in code and its dependencies and justify that they work as intended after testing
This adds a RO DataStreamingServer on a separate port. It sets None as its input handler, meaning all inputs are skipped.
Describe alternatives you've considered
That was the only way I could figure out that prevents sending keystrokes and is not susceptible to misuse/malicious actors.
Additional context