| 
						
						
						
					 | 
					@ -1,5 +1,6 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					package com.epmet.modules.test; | 
					 | 
					 | 
					package com.epmet.modules.test; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.HttpContextUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.epmet.commons.tools.utils.Result; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.web.bind.annotation.PostMapping; | 
					 | 
					 | 
					import org.springframework.web.bind.annotation.PostMapping; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
					 | 
					 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -13,8 +14,8 @@ public class TestController { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @PostMapping("get-req-info") | 
					 | 
					 | 
					    @PostMapping("get-req-info") | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public Result testDomain(HttpServletRequest request) { | 
					 | 
					 | 
					    public Result testDomain(HttpServletRequest request) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        String domain = String.format("%s://%s:%s", request.getHeader("X-Forwarded-Scheme"), request.getServerName(), request.getServerPort()); | 
					 | 
					 | 
					        String requestServerNameAndPort = HttpContextUtils.getRequestServerNameAndPort(); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        return new Result().ok(domain); | 
					 | 
					 | 
					        return new Result().ok(requestServerNameAndPort); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					} | 
					 | 
					 | 
					} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					
  |