Преглед на файлове

feature: 网关兼容旧的静态服务

Walker преди 1 година
родител
ревизия
2fd3483727
променени са 2 файла, в които са добавени 69 реда и са изтрити 6 реда
  1. 1 1
      src/main/resources/application-biz-qa.yml
  2. 68 5
      src/main/resources/application-routes-qa.yml

+ 1 - 1
src/main/resources/application-biz-qa.yml

@@ -1,6 +1,6 @@
 # 公共变量
 servers-mapping:
-  web-static: http://120.77.174.122:8989
+  web-static: http://120.77.174.122:9998
   marketing-api: http://172.18.226.68:11320
   alipay-mp-api: http://120.77.174.122:8097
   external-api-service: http://120.77.174.122:7777

+ 68 - 5
src/main/resources/application-routes-qa.yml

@@ -273,6 +273,10 @@ spring:
           predicates:
             - Host=${host-name.cloudfilm-qa}
             - Path=/**
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         # doc-qa
 
@@ -281,6 +285,10 @@ spring:
           predicates:
             - Host=${host-name.doc-qa}
             - Path=/user/login
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         - id: doc-qa-auth-wechat-oauth2
           uri: ${lb-servers.internethospital-web}
@@ -325,6 +333,8 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-doctor-pc-app}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
 
 
         # glasses-qa
@@ -435,6 +445,8 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-nfth-mp}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
 
         # 太和公众号 end
 
@@ -499,6 +511,8 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-nfywt-mp-base-for-nfywtwe}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
 
         - id: m-qa-nfywtwe-notify
           uri: ${lb-servers.ywt-platform-rest}
@@ -516,6 +530,8 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-nfywt-mp}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
 
         # 南方医务通公众号 end
 
@@ -535,6 +551,9 @@ spring:
           predicates:
             - Host=${host-name.m-qa}
             - Path=/doctorwe/share/doctorInfo
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
 
         - id: m-qa-drapi-auth-wechat
           uri: ${lb-servers.internethospital-web}
@@ -569,6 +588,8 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-doc-mp}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
 
         # 医生端 我的工作站 公众号 end
 
@@ -588,6 +609,10 @@ spring:
           predicates:
             - Host=${host-name.m-qa}
             - Path=/thnetdocwe/share/doctorInfo
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         - id: m-qa-thnetdocapi-auth-wechat
           uri: ${lb-servers.internethospital-web}
@@ -622,6 +647,9 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-thnetdoc-mp}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
         # 医生端 南方医院太和互联网医院医生版 公众号 end
 
         # 医生端 南方医院白云互联网医院医生版 公众号 start
@@ -640,6 +668,10 @@ spring:
           predicates:
             - Host=${host-name.m-qa}
             - Path=/nfyybyfydocwe/share/doctorInfo
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         - id: m-qa-nfyybyfydocapi-auth-wechat
           uri: ${lb-servers.internethospital-web}
@@ -674,6 +706,9 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-nfyybyfydoc-mp}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
         # 医生端 南方医院白云互联网医院医生版 公众号 end
 
         # 顺丰推送 start
@@ -759,6 +794,9 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.ywt-wechat-gdywt-mp-base}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
         # 【广东医务通】公众号 end
 
         # 【医务通互联网医院】公众号 start
@@ -787,6 +825,10 @@ spring:
           predicates:
             - Host=${host-name.m-qa}
             - Path=/thnetpatientwe/**
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         # 【医务通互联网医院】公众号 end
 
@@ -795,6 +837,10 @@ spring:
           predicates:
             - Host=${host-name.m-qa}
             - Path=/thnetdocmp/**
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         - id: m-qa-thnetdocexapi
           uri: ${lb-servers.internethospital-web}
@@ -849,6 +895,9 @@ spring:
             - name: Auth
               args:
                 refreshAuth: ${auths-name.ywt-wechat-druggistwe-mp}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         - id: m-qa-marketingapitest-marketingapi
           uri: ${servers-mapping.marketing-api}
@@ -886,6 +935,10 @@ spring:
           predicates:
             - Host=${host-name.m-qa}
             - Path=/nfyybyfywe/**
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
 
         # m-qa end
 
@@ -907,6 +960,11 @@ spring:
           predicates:
             - Host=${host-name.mg-qa}
             - Path=/m-sysconfig/user/login
+          filters:
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
+
         # 登录接口
         - id: mg-qa-api-auth-login
           uri: ${lb-servers.ywt-mgcenter-web}
@@ -998,11 +1056,12 @@ spring:
             - Host=${host-name.mg-qa}
             - Path=/**
           filters:
-            - PreserveHostHeader  # 发送网关原始主机头
-#            - name: Auth
-#              args:
-#                authResponse401: true
-#                auth: ${auths-name.ywt-mg}
+            - PreserveHostHeader
+            - RewritePath=([^/])$,$1/
+            - name: Auth
+              args:
+                authResponse401: true
+                auth: ${auths-name.ywt-mg}
         # 管理后台 end
 
 
@@ -1143,6 +1202,10 @@ spring:
             - name: Auth
               args:
                 auth: ${auths-name.external-api}
+            - RewritePath=([^/])$,$1/
+            - PreserveHostHeader
+
+
 
 
         # openapi-qa