mirror of
https://github.com/qdm12/gluetun.git
synced 2026-08-05 03:43:24 +02:00
fix(ipvanish): updater user agent to work again
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package unzip
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -8,6 +9,16 @@ type Unzipper struct {
|
||||
client *http.Client
|
||||
}
|
||||
|
||||
type contextKey int
|
||||
|
||||
const (
|
||||
userAgentContextKey contextKey = iota
|
||||
)
|
||||
|
||||
func WithUserAgent(ctx context.Context, userAgent string) context.Context {
|
||||
return context.WithValue(ctx, userAgentContextKey, userAgent)
|
||||
}
|
||||
|
||||
func New(client *http.Client) *Unzipper {
|
||||
return &Unzipper{
|
||||
client: client,
|
||||
|
||||
Reference in New Issue
Block a user