You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

util.go 394B

1234567891011121314
  1. // Copyright 2020 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package proxyprotocol
  4. import "io"
  5. var localHeader = append(v2Prefix, '\x20', '\x00', '\x00', '\x00', '\x00')
  6. // WriteLocalHeader will write the ProxyProtocol Header for a local connection to the provided writer
  7. func WriteLocalHeader(w io.Writer) error {
  8. _, err := w.Write(localHeader)
  9. return err
  10. }