소스 검색

【QQYUN-8561】企业微信登陆请求接口设置上下文不一致,导致接口404

JEECG 1 년 전
부모
커밋
6360aee0ff
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      jeecg-boot-base-core/src/main/java/org/jeecg/common/util/CommonUtils.java

+ 5 - 2
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/CommonUtils.java

@@ -348,8 +348,11 @@ public class CommonUtils {
 
         //返回 host domain
         String baseDomainPath = null;
-        int length = 80;
-        if(length == serverPort){
+        //update-begin---author:wangshuai---date:2024-03-15---for:【QQYUN-8561】企业微信登陆请求接口设置上下文不一致,导致接口404---
+        int httpPort = 80;
+        int httpsPort = 443;
+        if(httpPort == serverPort || httpsPort == serverPort){
+        //update-end---author:wangshuai---date:2024-03-15---for:【QQYUN-8561】企业微信登陆请求接口设置上下文不一致,导致接口404---~
             baseDomainPath = scheme + "://" + serverName  + contextPath ;
         }else{
             baseDomainPath = scheme + "://" + serverName + ":" + serverPort + contextPath ;