0

I have to make CORS with content type JSON. We have used [ApiAuthorization] filter in our get method as mentioned below.

  [AcceptVerbs("Get", "Options")]
  [ApiAuthorization]
        public response GetDetails()
        {

In case of preflight(option) request we are getting 401 Unauthorized error. What is a correct way to pass authentication header in this scenarios with CORS?

JleruOHeP
  • 10,106
  • 3
  • 45
  • 71
  • Your server should not require authentication for preflight requests, as there is no way to add custom headers to these requests. – Ray Nicholus Jan 16 '14 at 14:59
  • I've run into same issue, here is my [solution][1] with ServiceStack [1]: http://stackoverflow.com/a/10820339/48262 – Sathish Naga May 14 '14 at 19:56

0 Answers0