Access-Control-Allow-Origin issues

前端 未结 2 1838
悲&欢浪女
悲&欢浪女 2021-02-05 17:51

I have two local rails apps that I would like to talk to each other for testing purposes... one is running on port 3000 and the other on 9292.

But when I make an ajax re

相关标签:
2条回答
  • 2021-02-05 18:16

    Cross-domain AJAX is generally not allowed for security reasons. JSONP is an option if you are able to use it. If not, you can use something like flXHR to get around this restriction.

    Best of luck!

    0 讨论(0)
  • 2021-02-05 18:18

    for me, there was a 50X/40X Status coming back back Chrome/WebKit displayed a named Access-Control-Allow-Origin Error.

    I played around with my responses until i got a 201 and now it works!

    0 讨论(0)
提交回复
热议问题