Use `https` protocol over `http`



ID: javascript-express/https-protocol-missing

Language: JavaScript

Severity: Warning

Category: Security


Per Express documentation:

If your app deals with or transmits sensitive data, use Transport Layer Security (TLS) to secure the connection and the data. This technology encrypts data before it is sent from the client to the server, thus preventing some common (and easy) hacks.

This rule will detect the usage of non https.createServer() usage.

Non-Compliant Code Examples

var http = require('http');
var express = require('express');
var app = express();

var httpServer = http.createServer(app)

Compliant Code Examples

var https = require('https');
var express = require('express');
var app = express();

var httpsServer = https.createServer(app)
httpsServer.listen(8080); jetbrains

Seamless integrations. Try Datadog Code Analysis