Skip to main content
InterviewHubPRO
Section Overview
Q32

Question 32 of 50

Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

64%
ASP.NET Core & Web API (50 Qs)•Part 3: Distributed Systems, Kestrel Internals & Scalability (25 - 35)

How do you configure CORS securely in ASP.NET Core?

senior LevelMost AskedSecurity & AuthSystem Design

In Simple Words: Never use AllowAnyOrigin() with AllowCredentials() in production: Explicitly whitelist trusted origins (WithOrigins("https://app.company.com")), restrict allowed HTTP methods (GET, POST), and specify allowed headers.