تخطَّ إلى المحتوى

Cleartext HTTP (ARCH6118)

هذا المحتوى غير متوفر بلغتك بعد.

Key ruby.security.cleartext-http · Severity warning · Category security · CWE CWE-319

Sending sensitive data over http:// leaves traffic unencrypted and exposed to man-in-the-middle attacks. Use TLS (https://) for all endpoints.

require "net/http"
uri = URI("http://api.example.com/login")
res = Net::HTTP.post_form(uri, email: email, password: password)
require "net/http"
uri = URI("https://api.example.com/login")
res = Net::HTTP.post_form(uri, email: email, password: password)

Switch all remote endpoints to https:// and keep TLS validation enabled.