CORS報錯
跟著老師敲的,但總是報下面的錯誤 Access?to?XMLHttpRequest?at?'localhost:8090/user/getotp'?from?origin?'null'?has?been?blocked?by?CORS?policy:?Cross?origin?requests?are?only?supported?for?protocol?schemes:?http,?data,?chrome,?chrome-extension,?https. 其他答案里面的方法都用過了,還是不行,有沒人能幫忙解決一下呀
2020-07-10
我的是http 寫成了htp
2019-07-18
這個注解要有,
要寫對
type:"POST",
contentType:"application/x-www-form-urlencoded",
url:"Http://localhost:8090/user/getotp",
這三塊也不能錯。
我自己的問題出在url 沒寫"HTTP://"