formData can only be Strings or Buffers - anything else will cause
errors. To help matters, we now look for invalid types and json-encode
them where needed.
When listing icons provided by a module, if there is a png and svg
with the same name, only the svg will be listed.
If a node asks for a png icon which is not known, but there is a
corresponding svg, that will be used instead.
Fixes#2216
This was broken when we switched from media-typer to content-type
modules for parsing the content-type header.
The content-type header can handle the field with parameters, but
does not do the type/sub-type parsing that media-typer does.
Our code relied on that extra bit of parsing to correctly
identify if the content should be parsed to String or kept as
a buffer.
The fix restores the use of media-typer, but using the result
of the content-type module to make sure it valid
formData can only be Strings or Buffers - anything else will cause
errors. To help matters, we now look for invalid types and json-encode
them where needed.
The way we dynamically added/removed event handlers for the
upgrade event was causing problems with the way sockjs (as
used by the worldmap node) tries to intercept the event.
This fix means the ws nodes won't ever remove the upgrade
listener - it gets added once when the first ws node is
deployed and will then remain until the last ws node is
removed and the runtime restarted.
* Authentication methods
* Authentication methods
* Authentication methods
* Support undefined auth type
* Support undefined auth type
* Apply basic auth on existing nodes
* Use password as bearer token
* Use password as bearer token
* Switch between password/token labels
* Bearer token abbreviation
* Separate token span
Significant update to the ws module to get it completely up to date.
The jump from 1.x to 6.x has required a rewrite of our WS handling. Most
specifically the means by which you can have multiple ws servers on a
single http server has completely changed; we now have to handle the
'upgrade' event on the server ourselves.