Documentation
¶
Index ¶
- Constants
- func BuildHopByHopHeaders(respHeader http.Header) map[string]struct{}
- func BuildWebSocketHeaders(c *gin.Context, accessToken *string) http.Header
- func CopyBodyWithFlush(w http.ResponseWriter, body io.Reader)
- func CopyRequestHeaders(from http.Header, to http.Header, skip map[string]struct{})
- func CopyResponseHeaders(from http.Header, to http.Header, hop map[string]struct{})
- func GetHopByHopHeaders() map[string]struct{}
- func GetSkipHeaders() map[string]struct{}
- func HTTPToWebSocketURL(url string) string
- func SetAgentToken(req *http.Request, accessToken *string)
- func SetAuthHeader(req *http.Request, c *gin.Context)
- func SetForwardedHeaders(req *http.Request, clientIP, host string)
Constants ¶
View Source
const ( HeaderAPIKey = "X-API-Key" // #nosec G101: header name, not a credential HeaderAuthorization = "Authorization" HeaderCookie = "Cookie" HeaderAgentToken = "X-Arcane-Agent-Token" // #nosec G101: header name, not a credential HeaderUpgrade = "Upgrade" HeaderConnection = "Connection" ConnectionUpgradeToken = "upgrade" )
Variables ¶
This section is empty.
Functions ¶
func BuildHopByHopHeaders ¶
func BuildWebSocketHeaders ¶
BuildWebSocketHeaders constructs a header set for proxying WebSocket requests to a remote environment, forwarding authentication in the same way as HTTP proxying.
func CopyBodyWithFlush ¶
func CopyBodyWithFlush(w http.ResponseWriter, body io.Reader)
CopyBodyWithFlush streams bytes from body to w, flushing when supported. Useful for progress/streaming endpoints where incremental delivery matters.
func CopyRequestHeaders ¶
func CopyResponseHeaders ¶
func GetHopByHopHeaders ¶
func GetHopByHopHeaders() map[string]struct{}
func GetSkipHeaders ¶
func GetSkipHeaders() map[string]struct{}
func HTTPToWebSocketURL ¶
HTTPToWebSocketURL converts an HTTP(S) URL to WS(S).
func SetAgentToken ¶
func SetForwardedHeaders ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.