ajax problem - 200 OK in firebug but red message with no response body

前端 未结 6 1709
一个人的身影
一个人的身影 2021-02-18 16:21

I have small ajax problem related to cross domain as i see it.

On localmachine i created html example with some ajax: in registration text field user types \'username\',

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-18 16:33

    For me, It was web api(c# .NET) request and cors was not enabled. Added header for cors on controller and it solved the problem.

    [EnableCors(origins: "*", headers: "*", methods: "*")]
    

提交回复
热议问题