Cleartext HTTP (ARCH3118)
Ce contenu n’est pas encore disponible dans votre langue.
Key typescript.security.cleartext-http · Severity warning · Category security · CWE CWE-319
Sending sensitive data over http:// lets the traffic be sniffed and tampered with on the network. Make all external calls over TLS.
Incorrect
Section titled “Incorrect”const res = await fetch("http://api.example.com/login", { method: "POST", body: JSON.stringify({ username, password }),});Correct
Section titled “Correct”const res = await fetch("https://api.example.com/login", { method: "POST", body: JSON.stringify({ username, password }),});Use https:// for all endpoints; never carry sensitive traffic over plaintext HTTP.