mirror of
				https://github.com/nadoo/glider.git
				synced 2025-11-04 15:52:38 +08:00 
			
		
		
		
	http: fixed a bug in reqHeader.Get
This commit is contained in:
		
							parent
							
								
									138c78697a
								
							
						
					
					
						commit
						77615f9f3d
					
				
							
								
								
									
										2
									
								
								http.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								http.go
									
									
									
									
									
								
							@ -103,7 +103,7 @@ func (s *HTTP) Serve(c net.Conn) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// X-Forwarded-For
 | 
						// X-Forwarded-For
 | 
				
			||||||
	if s.xff {
 | 
						if s.xff {
 | 
				
			||||||
		if reqHeader.Get("") != "" {
 | 
							if reqHeader.Get("X-Forwarded-For") != "" {
 | 
				
			||||||
			reqHeader.Add("X-Forwarded-For", ",")
 | 
								reqHeader.Add("X-Forwarded-For", ",")
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		reqHeader.Add("X-Forwarded-For", c.RemoteAddr().(*net.TCPAddr).IP.String())
 | 
							reqHeader.Add("X-Forwarded-For", c.RemoteAddr().(*net.TCPAddr).IP.String())
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user