Documentation ¶
Index ¶
- func ApplyCustomCookies(req *http.Request, cookies map[string]string, log logger.Logger)
- func CookiesFromHeader(header http.Header) []*http.Cookie
- func GetCookies(next http.Handler, log logger.Logger) http.Handler
- func ParseCookieHeader(header string) *http.Cookie
- func RedactSensitiveCookies(cookies []*http.Cookie) []*http.Cookie
- func SerializeCookies(cookies []*http.Cookie) string
- func SetSpecificCookies(req *http.Request, cookies map[string]string)
- func SetupCookieJar(client *http.Client, enableCookieJar bool, log logger.Logger) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCustomCookies ¶ added in v0.1.37
ApplyCustomCookies checks and applies custom cookies to the HTTP request if any are configured. It logs the names of the custom cookies being applied without exposing their values.
func CookiesFromHeader ¶
Utility function to convert cookies from http.Header to []*http.Cookie. This can be useful if cookies are stored in http.Header (e.g., from a response).
func GetCookies ¶ added in v0.1.6
GetCookies is a middleware that extracts cookies from incoming requests and serializes them.
func ParseCookieHeader ¶
ParseCookieHeader parses a single Set-Cookie header and returns an *http.Cookie.
func RedactSensitiveCookies ¶
RedactSensitiveCookies redacts sensitive information from cookies. It takes a slice of *http.Cookie and returns a redacted slice of *http.Cookie.
func SerializeCookies ¶ added in v0.1.6
SerializeCookies serializes a slice of *http.Cookie into a string format.
func SetSpecificCookies ¶ added in v0.1.37
SetSpecificCookies sets specific cookies provided in the configuration on the HTTP request.
Types ¶
This section is empty.