| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 | 
							- 1、nacos gateway配置文件增加-部署中心路由节点:
 
- spring:
 
-   cloud:
 
-     gateway:
 
-         routes:
 
-           # 部署中心服务
 
-           - id: soc-deploy
 
-             uri: lb://soc-deploy
 
-             predicates:
 
-               - Path=/api/delpoy/**
 
-             filters:
 
-               - StripPrefix=2
 
-            # websocket模块
 
-           - id: soc-websocket
 
-             uri: lb:ws://soc-mediator
 
-             predicates:
 
-               - Path=/ws/**
 
-           - id: soc-websocket
 
-             uri: lb:ws://soc-mediator
 
-             predicates:
 
-               - Path=/ws1/**
 
-           - id: soc-host
 
-             uri: lb:ws://soc-host
 
-             predicates:
 
-               - Path=/host/**
 
-           - id: soc-host
 
-             uri: lb:ws://soc-host
 
-             predicates:
 
-               - Path=/host1/**
 
-   在spring.cloud.gateway节点下增加以下配置:
 
-         httpclient:
 
-           websocket:
 
-             max-frame-payload-length: 5242880
 
-     例:
 
-     spring:
 
-       cloud:
 
-         gateway:
 
-           httpclient:
 
-             websocket:
 
-               max-frame-payload-length: 5242880
 
- 2、nacos gateway配置文件增加-部署中心不校验白名单:
 
- security:
 
-   ignore:
 
-      whites:
 
-         - /api/deploy/register
 
-         - /api/deploy/accesstoken
 
-         - /api/deploy/package/download/**
 
-         - /api/deploy/agent/download/**
 
-         - /api/deploy/frontend/synchronDate
 
-         - /api/deploy/heartbeat
 
-         - /api/deploy/list
 
-         - /api/deploy/report
 
-         - /api/deploy/task
 
-         - /api/deploy/taskReport
 
-         - /ws/**
 
-         - /ws1/**
 
-         - /host/**
 
-         - /host1/**
 
- 3.nginx配置文件修改
 
-     3.1在监听8080的 server块下增加配置:
 
-         location /ws {
 
-                  proxy_pass http://api;
 
-                  proxy_http_version 1.1;
 
-                  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
-                  proxy_set_header Upgrade $http_upgrade;
 
-                  proxy_set_header Connection "upgrade";
 
-                  proxy_set_header Host $host;
 
-         }
 
-     3.2在监听8080的 server块下 location @api { 这一行下一行追加两行代码:
 
-         proxy_set_header X-Local-Ip $host;
 
-         proxy_set_header X-Local-Port $server_port;
 
-     3.3 修改http下配置 client_max_body_size 大小
 
-         client_max_body_size 2048M;
 
-     3.4 重新加载配置文件:
 
-         在nginx的安装目录下的sbin目录执行命令: ./nginx -s reload
 
- 4.修改上传文件大小-在nacos application-dev.yml中修改
 
-     spring:
 
-         servlet:
 
-             multipart:
 
-               max-file-size: 2048MB
 
- 5.nacos新增配置:soc-host-dev.yml,配置内容可复制mediator配置文件,若配置文件中有配置服务名称,则修改为soc-host,若无则不修改
 
 
  |