Cors Task 3
Cors Task 3
# What is CORS ?
CORS (Cross-Origin Resource Sharing) is a security feature
implemented by web browsers that controls how resources on
a web page can be requested from another domain (or origin).
It is designed to prevent malicious websites from making
unauthorized requests to your website using the user's
credentials.
# What is HSTS
HSTS (HTTP Strict Transport Security) is a web security policy
mechanism that protects websites against certain types of
attacks, particularly man-in-the-middle (MITM) attacks and
protocol downgrade attacks. It enforces the use of HTTPS
(instead of HTTP) for all communications between a web server
and a browser.
Benefits of HSTS
1. Prevents Protocol Downgrade Attacks:
o An attacker could try to downgrade a secure HTTPS
connection to HTTP. HSTS ensures the browser won’t
accept this.
2. Defends Against SSL Strip Attacks:
o SSL stripping involves intercepting HTTPS traffic and
converting it to HTTP. HSTS blocks this by requiring
HTTPS.
3. Enhances User Trust:
o Users are guaranteed a secure connection, reducing
the risk of sensitive data being intercepted.
4. Eliminates Mixed Content Warnings:
o HSTS ensures that all resources (e.g., scripts, images)
are loaded over HTTPS, avoiding mixed content
issues.
LABS