Skip to content

Commit 68d1791

Browse files
authored
Update customization.md for HTTP/2 Cleartext (#132)
1 parent e186b4f commit 68d1791

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

website/content/guide/customization.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ s := &http.Server{
8888
e.Logger.Fatal(e.StartServer(s))
8989
```
9090

91+
## Custom HTTP/2 Cleartext Server
92+
93+
`Echo#StartH2CServer()` can be used to run a custom HTTP/2 cleartext server.
94+
95+
*Example*
96+
97+
```go
98+
import "golang.org/x/net/http2"
99+
100+
s := &http2.Server{
101+
MaxConcurrentStreams: 250,
102+
MaxReadFrameSize: 1048576,
103+
IdleTimeout: 10 * time.Second,
104+
}
105+
e.Logger.Fatal(e.StartH2CServer(":1323", s))
106+
```
107+
91108
## Startup Banner
92109

93110
`Echo#HideBanner` can be used to hide the startup banner.

0 commit comments

Comments
 (0)