@@ -7,7 +7,7 @@ use std::env;
77
88mod constants;
99mod cookies;
10- use constants:: { SYNTH_HEADER_FRESH , SYNTH_HEADER_POTSI } ;
10+ use constants:: { SYNTHETIC_HEADER_FRESH , SYNTHETIC_HEADER_POTSI } ;
1111mod models;
1212use models:: AdResponse ;
1313mod prebid;
@@ -60,7 +60,7 @@ fn handle_main_page(settings: &Settings, req: Request) -> Result<Response, Error
6060
6161 println ! (
6262 "Existing POTSI header: {:?}" ,
63- req. get_header( SYNTH_HEADER_POTSI )
63+ req. get_header( SYNTHETIC_HEADER_POTSI )
6464 ) ;
6565 println ! ( "Generated Fresh ID: {}" , fresh_id) ;
6666 println ! ( "Using POTSI ID: {}" , synthetic_id) ;
@@ -69,8 +69,8 @@ fn handle_main_page(settings: &Settings, req: Request) -> Result<Response, Error
6969 let mut response = Response :: from_status ( StatusCode :: OK )
7070 . with_body ( HTML_TEMPLATE )
7171 . with_header ( header:: CONTENT_TYPE , "text/html" )
72- . with_header ( SYNTH_HEADER_FRESH , & fresh_id) // Fresh ID always changes
73- . with_header ( SYNTH_HEADER_POTSI , & synthetic_id) ; // POTSI ID remains stable
72+ . with_header ( SYNTHETIC_HEADER_FRESH , & fresh_id) // Fresh ID always changes
73+ . with_header ( SYNTHETIC_HEADER_POTSI , & synthetic_id) ; // POTSI ID remains stable
7474
7575 // Always set the cookie with the synthetic ID
7676 response. set_header (
@@ -312,14 +312,14 @@ async fn handle_prebid_test(settings: &Settings, mut req: Request) -> Result<Res
312312
313313 println ! (
314314 "Existing POTSI header: {:?}" ,
315- req. get_header( SYNTH_HEADER_POTSI )
315+ req. get_header( SYNTHETIC_HEADER_POTSI )
316316 ) ;
317317 println ! ( "Generated Fresh ID: {}" , fresh_id) ;
318318 println ! ( "Using POTSI ID: {}" , synthetic_id) ;
319319
320320 // Set both IDs as headers
321- req. set_header ( SYNTH_HEADER_FRESH , & fresh_id) ;
322- req. set_header ( SYNTH_HEADER_POTSI , & synthetic_id) ;
321+ req. set_header ( SYNTHETIC_HEADER_FRESH , & fresh_id) ;
322+ req. set_header ( SYNTHETIC_HEADER_POTSI , & synthetic_id) ;
323323
324324 println ! ( "Using POTSI ID: {}, Fresh ID: {}" , synthetic_id, fresh_id) ;
325325
@@ -344,7 +344,7 @@ async fn handle_prebid_test(settings: &Settings, mut req: Request) -> Result<Res
344344
345345 println ! ( "Attempting to send bid request to Prebid Server at prebid_backend" ) ;
346346
347- match prebid_req. send_bid_request ( & req) . await {
347+ match prebid_req. send_bid_request ( settings , & req) . await {
348348 // Pass the original request
349349 Ok ( mut prebid_response) => {
350350 println ! ( "Received response from Prebid Server" ) ;
0 commit comments