3

react 项目开发站点的问题

 2 years ago
source link: https://www.v2ex.com/t/801189
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

V2EX  ›  React

react 项目开发站点的问题

  tong911115a · 1 天前 · 644 次点击

1.本地跑项目 http://localhost:10000/ 默认会去查找本地 storage 的 token,没有的话跳转到某个站点去请求。通过 NAS 登录,请求完后跳转到 https://cargo.xxxx.lt/的地址,存入的此域名下的 local 。 现在问题是,跳转后回不到我本地开发地址,因为跨域存在我也获取不到,只能手动 copy 放入,对开发非常不友好。 能否通过什么方法,让我跳转后也能全局获取到 storage 的 token 获取能否代理跳转回本地?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK