Fixes a bug where sockets would be rejected if they connected directly
with the 'websocket' transport instead of doing an AJAX connection with
websocket upgrade (e.g. if `transports: ['websocket']` is passed to the
socket.io-client constructor).
See https://github.com/socketio/socket.io/blob/master/docs/API.md#sockethandshake
The `cytube-common` module was created as part of a now-defunct
experiment and since then has just remained a crufty container for a few
utils. Moved the utils to the main repo and removed the dependency.
Add a dependency on `prom-client` and emit a basic latency metric for
testing purposes. Add a new configuration file for enabling/disabling
prometheus exporter and configuring the listen address.
At various times in the past, upgrades in the sanitize-html library that
changed behavior of HTML filtering have caused things like emotes to
break unexpectedly. This commit adds a basic test to sanitize
non-alphanumeric characters found in channels' emote codes so that if
the library changes, the test will break and give a heads up that
something changed.
Camo: https://github.com/atmos/camo. This has a couple advantages over
just allowing images to be dumped as-is:
- Prevents mixed-content warnings by allowing the server to proxy HTTP
images to an HTTPS camo instance
- Protects users' privacy by not exposing their browser directly to
the image host
- Allows the camo proxy to intercept and reject bad image sources
(URLs that are not actually images, gigapixel-sized images likely to
DoS users' browsers, etc.)
Whitelisting specific domains is supported for cases where the source is
known to be trustworthy.
Code is not used anywhere yet, but the end goal is:
* Replace the bash-style algorithm with a less kludgy one
* Add the ability to customize tab completion method (will also
include default zsh-style completion)
* Abstract tab completion so it can be shared for chat and emote names
as available options