Bird
0
0

Why is it important to specify AllowedHeaders in an S3 bucket CORS configuration when your web app sends custom headers?

hard📝 Conceptual Q10 of 15
AWS - API Gateway
Why is it important to specify AllowedHeaders in an S3 bucket CORS configuration when your web app sends custom headers?
ABecause browsers send a preflight OPTIONS request that checks AllowedHeaders before the actual request
BBecause AllowedHeaders encrypts the headers for security
CBecause AllowedHeaders increases the bucket storage size
DBecause AllowedHeaders controls the bucket's access logging
Step-by-Step Solution
Solution:
  1. Step 1: Understand preflight requests

    Browsers send OPTIONS preflight requests to check if custom headers are allowed.
  2. Step 2: Role of AllowedHeaders

    AllowedHeaders tells the browser which headers are permitted in actual requests.
  3. Final Answer:

    Browsers send preflight OPTIONS request that checks AllowedHeaders -> Option A
  4. Quick Check:

    AllowedHeaders controls preflight header checks [OK]
Quick Trick: AllowedHeaders must list all custom headers for preflight success [OK]
Common Mistakes:
MISTAKES
  • Thinking AllowedHeaders encrypts headers
  • Confusing AllowedHeaders with storage or logging
  • Ignoring preflight OPTIONS requests

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More AWS Quizzes