This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"github.com/andrew/go-computer/internal/config"
|
||||
"github.com/andrew/superbrain/internal/config"
|
||||
"net"
|
||||
"net/http"
|
||||
"sort"
|
||||
@@ -184,9 +184,9 @@ func clientIP(r *http.Request) string {
|
||||
// SEC-2). Next only forwards an IP when TRUSTED_PROXY=1 pins the boundary
|
||||
// that overwrites X-Real-IP (the shipped nginx template does).
|
||||
const (
|
||||
headerClientIP = "X-Computer-Client-Ip"
|
||||
headerClientTs = "X-Computer-Client-Ts"
|
||||
headerClientSig = "X-Computer-Client-Sig"
|
||||
headerClientIP = "X-superbrain-Client-Ip"
|
||||
headerClientTs = "X-superbrain-Client-Ts"
|
||||
headerClientSig = "X-superbrain-Client-Sig"
|
||||
// forwardSkew bounds clock skew and replay of the signed identity.
|
||||
forwardSkew = 60 * time.Second
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user