iT邦幫忙

0

關於vuecli 上線打包 CORS

我的專案build 之後 打開index.html 出現了跨域問題,
https://ithelp.ithome.com.tw/upload/images/20200427/20120490MNCmueVaFl.png

我API接口是政府的opendata,在本機開發是用proxytable解決跨域
https://ithelp.ithome.com.tw/upload/images/20200427/2012049002zSWCtFrX.png
https://ithelp.ithome.com.tw/upload/images/20200427/20120490lk6Zy88m5b.png

請問該如何解決呢??

froce iT邦大師 1 級 ‧ 2020-04-27 13:43:02 檢舉
自己接回你的後端再送啊...
政府開放是開放,每個人都要從政府的主機直接取,政府的主機也會受不了的。
ccc123 iT邦新手 5 級 ‧ 2020-04-27 13:55:12 檢舉
了解 感謝你 已經找到方法
dragonH iT邦超人 5 級 ‧ 2020-04-27 15:03:53 檢舉
可以用 nginx 來 reverse proxy
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答