No 'Access-Control-Allow-Origin' header is present on the requested resource

前端 未结 2 1644
陌清茗
陌清茗 2021-01-22 16:18
    
        
            
                
                

        
相关标签:
2条回答
  • 2021-01-22 17:10

    you are trying to perform XMLHttpRequest(AJAX) to another domain.

    This is restricted due to security reasons.

    for more details see: http://en.wikipedia.org/wiki/Cross-origin_resource_sharing

    0 讨论(0)
  • 2021-01-22 17:23

    you are missing semicolon on line:

    request.setRequestHeader("Access-Control-Allow-Origin: ", "*")

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