Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Łukasz Nowak
caddy
Commits
da5b3cfc
Commit
da5b3cfc
authored
Aug 01, 2016
by
Matt Holt
Committed by
GitHub
Aug 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #976 from wjkohnen/h2
Re-enable HTTP/2 for Go 1.7.
parents
372c77da
d88dd74d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
caddyhttp/httpserver/server.go
caddyhttp/httpserver/server.go
+4
-0
No files found.
caddyhttp/httpserver/server.go
View file @
da5b3cfc
...
@@ -92,6 +92,10 @@ func NewServer(addr string, group []*SiteConfig) (*Server, error) {
...
@@ -92,6 +92,10 @@ func NewServer(addr string, group []*SiteConfig) (*Server, error) {
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
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)
// Compile custom middleware for every site (enables virtual hosting)
for
_
,
site
:=
range
group
{
for
_
,
site
:=
range
group
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment