mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-25 15:52:45 -04:00 
			
		
		
		
	* Check for nil ALPN; close #5470 * Apply patch * Actually I want to try this
This commit is contained in:
		
							parent
							
								
									5ebb7d496d
								
							
						
					
					
						commit
						a02ecb0f88
					
				| @ -54,7 +54,7 @@ func (cp ConnectionPolicies) Provision(ctx caddy.Context) error { | |||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		// enable HTTP/2 by default | 		// enable HTTP/2 by default | ||||||
| 		if len(pol.ALPN) == 0 { | 		if pol.ALPN == nil { | ||||||
| 			pol.ALPN = append(pol.ALPN, defaultALPN...) | 			pol.ALPN = append(pol.ALPN, defaultALPN...) | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| @ -283,7 +283,7 @@ func (p *ConnectionPolicy) buildStandardTLSConfig(ctx caddy.Context) error { | |||||||
| 			break | 			break | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 	if !alpnFound { | 	if !alpnFound && (cfg.NextProtos == nil || len(cfg.NextProtos) > 0) { | ||||||
| 		cfg.NextProtos = append(cfg.NextProtos, acmez.ACMETLS1Protocol) | 		cfg.NextProtos = append(cfg.NextProtos, acmez.ACMETLS1Protocol) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user