Skip to content

Commit c3bde36

Browse files
committed
fix: don't pass a Nil body when contacting a local host
1 parent 4002ae2 commit c3bde36

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

internal/server/tls_on_demand.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func (c *TLSOnDemandChecker) HostPolicy() (autocert.HostPolicy, error) {
4949
func (c *TLSOnDemandChecker) LocalHostPolicy() autocert.HostPolicy {
5050
return func(ctx context.Context, host string) error {
5151
path := c.buildURLOrPath(host)
52-
req, err := http.NewRequestWithContext(ctx, http.MethodGet, path, nil)
52+
req, err := http.NewRequestWithContext(ctx, http.MethodGet, path, http.NoBody)
5353
if err != nil {
5454
return err
5555
}

0 commit comments

Comments
 (0)