API Design · Middle · Question 67 of 75

Why can't an API respond with Access-Control-Allow-Origin: * to credentialed browser requests?

Explanation

Echo only origins from an allow list, and add Vary: Origin so caches don't mix responses for different origins.

Further reading

Problem with a question

API Design · Middle · question 67

Test yourself

Take the API Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz