Web Security · Middle · Question 33 of 75
Why should Access-Control-Allow-Origin: null never be allowed with credentials?
- 1Because
nullmeans the request came from the same server - 2Because
nullturns CORS off - ✓Correct answer: Sandboxed iframes and
data:URLs sendOrigin: null, so an attacker can easily produce it
Explanation
Trusting null for local development often ends up in production and lets any page that makes a sandboxed iframe read your data.