@@ -53,6 +53,7 @@ func (a *IxAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters
5353
5454 ixDiagFields := make (map [string ]interface {})
5555
56+ impEndPoint := ""
5657 for _ , imp := range requestCopy .Imp {
5758 var err error
5859 ixExt , err := unmarshalToIxExt (& imp )
@@ -67,6 +68,7 @@ func (a *IxAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters
6768 continue
6869 }
6970
71+ impEndPoint = ixExt .Endpoint
7072 if err := moveSid (& imp , ixExt ); err != nil {
7173 errs = append (errs , err )
7274 }
@@ -96,7 +98,7 @@ func (a *IxAdapter) MakeRequests(request *openrtb2.BidRequest, reqInfo *adapters
9698 }
9799
98100 if len (requestCopy .Imp ) != 0 {
99- if requestData , err := createRequestData (a , & requestCopy , & headers ); err == nil {
101+ if requestData , err := createRequestData (a , & requestCopy , & headers , impEndPoint ); err == nil {
100102 requests = append (requests , requestData )
101103 } else {
102104 errs = append (errs , err )
@@ -172,11 +174,15 @@ func parseSiteId(ixExt *openrtb_ext.ExtImpIx, uniqueSiteIDs map[string]struct{})
172174 return nil
173175}
174176
175- func createRequestData (a * IxAdapter , request * openrtb2.BidRequest , headers * http.Header ) (* adapters.RequestData , error ) {
177+ func createRequestData (a * IxAdapter , request * openrtb2.BidRequest , headers * http.Header , impEndpoint string ) (* adapters.RequestData , error ) {
176178 body , err := json .Marshal (request )
179+ endPoint := a .URI
180+ if len (impEndpoint ) > 0 {
181+ endPoint = impEndpoint
182+ }
177183 return & adapters.RequestData {
178184 Method : "POST" ,
179- Uri : a . URI ,
185+ Uri : endPoint ,
180186 Body : body ,
181187 Headers : * headers ,
182188 ImpIDs : openrtb_ext .GetImpIDs (request .Imp ),
0 commit comments