部署时候entry不需要改动吗,我打包放到服务器上后显示跨域问题

来源:1-1 导学

def_myself

2022-03-29

以下是报错信息:

Access to fetch at 'http://localhost:3001/' from origin 
'http://xxxxxxxxx' has been blocked by CORS policy: The 
request client is not a secure context and the resource is in 
more-private address space `local`.

GET http://localhost:3001/ net::ERR_FAILED


写回答

1回答

yancy

2022-03-30

需要改动,替换成线上地址

0
2
def_myself
替换成线上地址,端口号写多少啊
2022-03-30
共2条回复

从0打造微前端框架,实战汽车资讯平台

专为2~5年前端工程师打造的架构能力提升课

791 学习 · 204 问题

查看课程