diff --git a/go.mod b/go.mod index 17e19db..89ff685 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/die-net/lrucache v0.0.0-20190707192454-883874fe3947 github.com/disintegration/imaging v1.6.2 github.com/dnaeon/go-vcr v1.0.1 // indirect + github.com/fcjr/aia-transport-go v1.2.1 github.com/gomodule/redigo v2.0.0+incompatible github.com/gorilla/mux v1.8.0 github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 diff --git a/go.sum b/go.sum index fd11ca5..a24a4d0 100644 --- a/go.sum +++ b/go.sum @@ -129,6 +129,8 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fcjr/aia-transport-go v1.2.1 h1:a40mu8FRRXZy45aTb8uWh9I9h+R6Roewa8+OA/wYHPo= +github.com/fcjr/aia-transport-go v1.2.1/go.mod h1:onSqSq3tGkM14WusDx7q9FTheS9R1KBtD+QBWI6zG/w= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= diff --git a/imageproxy.go b/imageproxy.go index 11e4077..b6cb80d 100644 --- a/imageproxy.go +++ b/imageproxy.go @@ -35,6 +35,7 @@ import ( "strings" "time" + "github.com/fcjr/aia-transport-go" "github.com/gregjones/httpcache" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" @@ -102,7 +103,7 @@ type Proxy struct { // be used. func NewProxy(transport http.RoundTripper, cache Cache) *Proxy { if transport == nil { - transport = http.DefaultTransport + transport, _ = aia.NewTransport() } if cache == nil { cache = NopCache