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