spark-wallet
spark-wallet copied to clipboard
Reduce reliance on external dependencies
Some candidates for removal that could easily be re-implemented inside Spark:
-
superagent
(only used for a simple HTTP GET request, can be replaced with the built-in http module) -
helmet
(sets security headers) -
js-yaml
(only used to format objects in a human-readable manner, we don't really need yaml) -
nanoid
(secure random string generator) -
is-ip
(few-liner dependency) -
ordinal
(few-liner dependency)
These are the headers set by helmet
, the most important one being the content security policy:
Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; font-src 'self' data:; img-src 'self' data:
Strict-Transport-Security: max-age=15552000; includeSubDomains
X-Content-Type-Options: nosniff
X-DNS-Prefetch-Control: off
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
There are also a few more that are sent to older browsers based on browser sniffing, like X-Content-Security-Policy
and X-WebKit-CSP
. Should look into helmet
to get the full list.