Why this matters
Meets SOC 2 encryption-in-transit and session hardening requirements.
Force HTTPS via middleware, set HSTS, and configure session cookies with secure=true, http_only=true, same_site=lax or strict in config/session.php.
Meets SOC 2 encryption-in-transit and session hardening requirements.
Side-by-side examples engineers can pattern-match during review.
$response->header('Set-Cookie','sid=1');config(['session.secure'=>true,'session.http_only'=>true,'session.same_site'=>'lax']);URL::forceScheme('https')config(['session.secure'=>false])From the same buckets as this rule.
Public services must require TLSv1.2 or higher and set HSTS (max-age ≥ 15552000, includeSubDomains). Reject plaintext HTTP and weak ciphers; cookies must be Secure and HttpOnly with SameSite set.