Browse Source
			
			
			reverseproxy: Set cookie path to `/` when using cookie lb_policy (#4096)
			
			
				master
			
			
		 
		
			
				
					
						
						Dimitri Masson
					
					5 years ago
					
						
							committed by
							
								
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 1 changed files with 
1 additions and 
1 deletions
			 
			
		 
		
			
				- 
					
					
					 
					modules/caddyhttp/reverseproxy/selectionpolicies.go
				
 
			
		
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
			
				
					| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -445,7 +445,7 @@ func selectNewHostWithCookieHashSelection(pool []*Upstream, w http.ResponseWrite | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							sha, err := hashCookie(cookieSecret, randomHost.Dial) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if err == nil { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								// write the cookie.
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								http.SetCookie(w, &http.Cookie{Name: cookieName, Value: sha, Secure: false}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								http.SetCookie(w, &http.Cookie{Name: cookieName, Value: sha, Path: "/", Secure: false}) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						return randomHost | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |