Why my $.ajax showing “preflight is invalid redirect error”?

后端 未结 8 756
花落未央
花落未央 2020-11-28 11:04

I tried the following code in Postman and it was working. Is there something wrong with the code?

$.ajax({
   url: \'http://api.example.com/users/get\',
   t         


        
8条回答
  •  温柔的废话
    2020-11-28 11:26

    I had the same problem and it kept me up for days. At the end, I realised that my URL pointing to the app was wrong altogether. example:

    URL: 'http://api.example.com/'
    URL: 'https://api.example.com/'.
    

    If it's http or https verify.
    Check the redirecting URL and make sure it's the same thing you're passing along.

提交回复
热议问题