采纳答案成功!
向帮助你的同学说点啥吧!感谢那些助人为乐的人
Dell 老师好,最近才买了这个课程,配置 Proxy 一直报错 404,vue-cli 版本是 4.5,该如何解决呢?
你把内容放到 public 里面试试,有可能 static 已经不支持了
我按照您在 Cli 版本迁移的课程里放在了 public 下,还是报错 404 Request URL: http://localhost:8080/api/index.json Request Method: GET Status Code: 404 Not Found Remote Address: 127.0.0.1:8080 Referrer Policy: strict-origin-when-cross-origin connection: close content-length: 161 content-security-policy: default-src 'none' content-type: text/html; charset=utf-8 date: Wed, 08 Dec 2021 10:19:37 GMT x-content-type-options: nosniff x-powered-by: Express Accept: application/json, text/plain, */* Accept-Encoding: gzip, deflate, br Accept-Language: zh-CN,zh;q=0.9 Cache-Control: no-cache Connection: keep-alive Host: localhost:8080 Pragma: no-cache Referer: http://localhost:8080/ Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1
不管放在public还是static里面,是不是都不能直接 http://localhost:8080/api/index.json 访问?
谢谢老师,已经解决了
登录后可查看更多问答,登录/注册
明星讲师DELL亲授,全方位知识点+高匹配度项目,入门到深度掌握
306 1
1.4k 18
1.4k 14
1.1k 12
1.0k 11
购课补贴联系客服咨询优惠详情
慕课网APP您的移动学习伙伴
扫描二维码关注慕课网微信公众号