内网穿透

来源:1-3 项目介绍与演示【课前必知】

打卤面加蛋

2021-04-13

我现在用小工具做了内网穿透图片描述
对于app.js代码也改了

portalIndexUrl: "http://liwei.cn.utools.club/imooc-news/portal/index.html",           // 门户首页地址
    writerLoginUrl: "http://liwei.cn.utools.club/imooc-news/writer/passport.html",      // 登录页面
    writerIndexUrl: "http://liwei.cn.utools.club/imooc-news/writer/contentMng.html",      // 作家中心首页
    writerInfoUrl: "http://liwei.cn.utools.club/imooc-news/writer/accountInfo.html",     // 用户信息完善页面
    
    adminCenterUrl: "http://liwei.cn.utools.club/imooc-news/admin/contentReview.html",     // 运营管理平台主页
    adminLoginUrl: "http://liwei.cn.utools.club/imooc-news/admin/login.html",        // admin后台登录页面
    adminIndexUrl: "http://liwei.cn.utools.club/imooc-news/admin/userList.html",        // admin后台默认页面
    
/**
    userServerUrl: "http://user.imoocnews.com:8003",        // 用户服务后端接口地址
    fsServerUrl: "http://files.imoocnews.com:8004",         // 文件服务后端接口地址
    adminServerUrl: "http://admin.imoocnews.com:8055",      // 运营管理服务后端接口地址
    articleServerUrl: "http://article.imoocnews.com:8001",      // 文章服务后端接口地址

	*/
	 // 结合 springcloud 使用zuul的网关地址请求即可 
    userServerUrl: "http://liwei1.cn.utools.club/api/service-user",        // 用户服务后端接口地址
    fsServerUrl: "http://liwei1.cn.utools.club/api/service-files",         // 文件服务后端接口地址
    adminServerUrl: "http://liwei1.cn.utools.club/api/service-admin",      // 运营管理服务后端接口地址
    articleServerUrl: "http://liwei1.cn.utools.club/api/service-article",      // 文章服务后端接口地

但是我不是做这个cookie

 /**
     * 如果本地使用localhost测试可以不使用,如果是ip或者域名测试,cookieDomain改为对应的ip或者域名
     * 例:
     *    ip:  192.168.1.111
     *    域名:   .imooc.com
     */
   cookieDomain: ".imooc.com", 

现在就是可以用,但是cookie存不了东西图片描述
这个cookieDomain如何设置?

# 设置域名,在java代码中获取,这里是资源配置
website:
  domain-name: imoocnews.com

还有,老师,后端这个怎么对应改呢? 不懂这个域名

写回答

1回答

风间影月

2021-04-13

根据你的域名来就行,内网穿透没意义,多站点可能出问题的。配置虚拟host即可哈~

0
2
风间影月
回复
打卤面加蛋
额。应该不行。要统一。不确定你的内网穿透怎么配置的。但是这个只能有一个域名。比如 abc.com,多个不同的是不行的
2021-04-13
共2条回复

Spring Cloud 进阶 Alibaba 微服务体系自媒体实战

一课收获分布式系统开发,微服务核心技术和中间件企业生产落地

1113 学习 · 896 问题

查看课程