Browser & Web Performance · Middle · Question 48 of 75
The frontend sends fetch(url, { credentials: "include" }) to another origin. What must the response contain?
- 1
Access-Control-Allow-Origin: *only - 2
Set-CookiewithSameSite=Strict - ✓Correct answer:
Access-Control-Allow-Originwith the exact origin (not*) andAccess-Control-Allow-Credentials: true
Explanation
With credentials the wildcard is not allowed. Also, cookies must be SameSite=None; Secure to be sent cross-site.