R

Ravina • 3.96K Points
Extraordinary

Q. How can you restrict allowed methods in CORS in FastAPI?

  • (A) allowed_methods in CORSMiddleware
  • (B) cors_methods parameter
  • (C) CORSFilter
  • (D) request.allow(methods=...)
  • Correct Answer - Option(A)
  • Views: 11
  • Filed under category Fast API
  • Hashtags:

Explanation by: Ravina
`CORSMiddleware` has an `allow_methods` parameter to restrict HTTP methods.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.