mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-28 01:02:49 -04:00 
			
		
		
		
	Re-enable HTTP/2 for Go 1.7.
* Since Go 1.7 HTTP/2 support is enabled only if TLSConfig.NextProtos includes the string "h2". * see mholt/caddy#975
This commit is contained in:
		
							parent
							
								
									7157bdc79d
								
							
						
					
					
						commit
						d88dd74dec
					
				| @ -92,6 +92,10 @@ func NewServer(addr string, group []*SiteConfig) (*Server, error) { | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
| 	// Since Go 1.7 HTTP/2 is enabled only if TLSConfig.NextProtos includes the string "h2". | ||||
| 	if HTTP2 && s.Server.TLSConfig != nil && len(s.Server.TLSConfig.NextProtos) == 0 { | ||||
| 		s.Server.TLSConfig.NextProtos = []string{"h2"} | ||||
| 	} | ||||
| 
 | ||||
| 	// Compile custom middleware for every site (enables virtual hosting) | ||||
| 	for _, site := range group { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user