respect omitServerIP
This commit is contained in:
parent
fa2fff4bac
commit
72da91a9b4
|
|
@ -208,13 +208,16 @@ export class HarTracer {
|
||||||
if (!harEntry)
|
if (!harEntry)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
harEntry.serverIPAddress = event.serverIPAddress;
|
|
||||||
harEntry._serverPort = event.serverPort;
|
|
||||||
harEntry.response.status = event.statusCode;
|
harEntry.response.status = event.statusCode;
|
||||||
harEntry.response.statusText = event.statusMessage;
|
harEntry.response.statusText = event.statusMessage;
|
||||||
harEntry.response.httpVersion = event.httpVersion;
|
harEntry.response.httpVersion = event.httpVersion;
|
||||||
harEntry.response.redirectURL = event.headers.location || '';
|
harEntry.response.redirectURL = event.headers.location || '';
|
||||||
|
|
||||||
|
if (!this._options.omitServerIP) {
|
||||||
|
harEntry.serverIPAddress = event.serverIPAddress;
|
||||||
|
harEntry._serverPort = event.serverPort;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this._options.omitTiming) {
|
if (!this._options.omitTiming) {
|
||||||
harEntry.timings = event.timings;
|
harEntry.timings = event.timings;
|
||||||
this._computeHarEntryTotalTime(harEntry);
|
this._computeHarEntryTotalTime(harEntry);
|
||||||
|
|
|
||||||
|
|
@ -847,6 +847,8 @@ it('should respect minimal mode for API Requests', async ({ contextFactory, serv
|
||||||
expect(entries).toHaveLength(1);
|
expect(entries).toHaveLength(1);
|
||||||
const [entry] = entries;
|
const [entry] = entries;
|
||||||
expect(entry.timings).toEqual({ receive: -1, send: -1, wait: -1 });
|
expect(entry.timings).toEqual({ receive: -1, send: -1, wait: -1 });
|
||||||
|
expect(entry.serverIPAddress).toBeUndefined();
|
||||||
|
expect(entry._serverPort).toBeUndefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should include redirects from API request', async ({ contextFactory, server }, testInfo) => {
|
it('should include redirects from API request', async ({ contextFactory, server }, testInfo) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue