Skip to content

Commit

Permalink
move pubmatic to HTTPS, remove macro, add back encoding (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Kendall authored and asweeney86 committed May 5, 2017
1 parent 0200d13 commit dd0d3b3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions adapters/pubmatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net/http"
"net/url"

"github.com/prebid/openrtb"
"github.com/prebid/prebid-server/pbs"
"golang.org/x/net/context/ctxhttp"
"io/ioutil"
"net/http"
)

type PubmaticAdapter struct {
Expand Down Expand Up @@ -138,12 +140,11 @@ func (a *PubmaticAdapter) Call(ctx context.Context, req *pbs.PBSRequest, bidder

func NewPubmaticAdapter(config *HTTPAdapterConfig, uri string, externalURL string) *PubmaticAdapter {
a := NewHTTPAdapter(config)

redirect_uri := fmt.Sprintf("%s/setuid?bidder=pubmatic&uid=$UID", externalURL)
usersyncURL := "http://ads.pubmatic.com/AdServer/js/user_sync.html?predirect="
redirect_uri := fmt.Sprintf("%s/setuid?bidder=pubmatic&uid=", externalURL)
usersyncURL := "https://ads.pubmatic.com/AdServer/js/user_sync.html?predirect="

info := &pbs.UsersyncInfo{
URL: fmt.Sprintf("%s%s", usersyncURL, redirect_uri),
URL: fmt.Sprintf("%s%s", usersyncURL, url.QueryEscape(redirect_uri)),
Type: "iframe",
SupportCORS: false,
}
Expand Down

0 comments on commit dd0d3b3

Please sign in to comment.