Reputation: 99
I am using playwright java lib 1.44 version. I am setting proxy url, username & password in Proxy object provided in launch options. But some how apache traffic proxy server is not able to authenticate it. Its debug logs does not show username/password in request headers which were meant for proxy server.
I am using following code to launch browser..
launchOptions.setProxy(new Proxy("http://proxy:8080/"));
launchOptions.proxy.setUsername("abcUser");
launchOptions.proxy.setPassword("123456");
Browser browser = playwright.chromium().launch(launchOptions);
Question:
In which request header playwright sets the authentication information ? header name ?
Is there anyway to view this header information?
Does playwright converts this proxy info internally into "Proxy-Authorization" : encoded("abcUser:123456") ?
shall i set it as follows? Is this required?
String proxyEncoding = Base64Encoder.encode ("abcUser:123456"); page.setExtraHTTPHeaders(Map.of("Proxy-Authorization", proxyEncoding));
Upvotes: 0
Views: 226