為什么下面的post沒問題,但是put請求會報錯:XMLHttpRequest cannot load http://localhost:8001/service. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63343' is therefore not allowed access.客戶端 $.ajax({ url: 'http://localhost:8001/man', method: 'POST', success: function (data) { console.log(data) } }); $.ajax({ url: 'http://localhost:8001/service', method: 'PUT', success: function (data) { console.log(data) } });服務端
ajax put請求的跨域問題
蕪湖不蕪
2018-09-03 09:27:17