How to resolve 'preflight is invalid (redirect)' or 'redirect is not allowed for a preflight request'

后端 未结 2 1224
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-22 06:16

I have followed this step to setup my server to enable CORS. https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api

2条回答
  •  孤街浪徒
    2020-11-22 06:46

    This happens sometimes when you try calling an https service as http, for example when you perform a request on:

    'http://example.com/api/v2/tickets'

    Which should be:

    'https://example.com/api/v2/tickets'

提交回复
热议问题