@@ -81,19 +81,6 @@ public Result<List<HttpRequest<BidRequest>>> makeHttpRequests(BidRequest request
8181 return Result .of (bidRequests , errors );
8282 }
8383
84- private static String getDomain (BidRequest request ) {
85- return Optional .ofNullable (request .getSite ())
86- .map (Site ::getPage )
87- .map (pageUrl -> {
88- try {
89- return new URIBuilder (pageUrl ).getHost ();
90- } catch (URISyntaxException e ) {
91- return null ;
92- }
93- })
94- .orElse (null );
95- }
96-
9784 private static String getReferer (BidRequest request ) {
9885 return Optional .ofNullable (request .getSite ())
9986 .map (Site ::getPage )
@@ -130,7 +117,7 @@ private static Imp modifyImp(Imp imp) {
130117 throw new PreBidException ("Imp #%s must contain at least one valid format (banner, video, or native)"
131118 .formatted (imp .getId ()));
132119 }
133-
120+
134121 return imp .toBuilder ()
135122 .displaymanager (DISPLAY_MANAGER )
136123 .displaymanagerver (DISPLAY_MANAGER_VERSION )
@@ -144,7 +131,7 @@ private static Banner modifyBanner(Banner banner) {
144131 if (banner == null ) {
145132 return null ;
146133 }
147-
134+
148135 final Integer weight = banner .getW ();
149136 final Integer height = banner .getH ();
150137 final List <Format > format = banner .getFormat ();
@@ -162,7 +149,7 @@ private static Video modifyVideo(Video video) {
162149 if (video == null ) {
163150 return null ;
164151 }
165-
152+
166153 final Integer width = video .getW ();
167154 final Integer height = video .getH ();
168155 if (width == null || height == null || width == 0 || height == 0 ) {
@@ -221,7 +208,7 @@ private static MultiMap headers(BidRequest bidRequest) {
221208 final MultiMap headers = HttpUtil .headers ();
222209
223210 headers .add (HttpUtil .X_OPENRTB_VERSION_HEADER , "2.5" );
224- HttpUtil .addHeaderIfValueIsNotEmpty (headers , "Referer" , getDomain (bidRequest ));
211+ HttpUtil .addHeaderIfValueIsNotEmpty (headers , "Referer" , getReferer (bidRequest ));
225212
226213 final Device device = bidRequest .getDevice ();
227214 if (device != null ) {
0 commit comments