mirror of
https://github.com/tlsnotary/tlsn-extension.git
synced 2026-01-09 13:08:04 -05:00
Compare commits
2 Commits
main
...
requests-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdaf6ca815 | ||
|
|
511272a451 |
@@ -5,9 +5,8 @@ import React, {
|
||||
useEffect,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { notarizeRequest, useRequest } from '../../reducers/requests';
|
||||
import { useRequest } from '../../reducers/requests';
|
||||
import classNames from 'classnames';
|
||||
import { useDispatch } from 'react-redux';
|
||||
import {
|
||||
Route,
|
||||
Routes,
|
||||
@@ -19,14 +18,12 @@ import Icon from '../Icon';
|
||||
import NavigateWithParams from '../NavigateWithParams';
|
||||
import {
|
||||
set,
|
||||
get,
|
||||
MAX_SENT_LS_KEY,
|
||||
MAX_RECEIVED_LS_KEY,
|
||||
getMaxRecv,
|
||||
getMaxSent,
|
||||
} from '../../utils/storage';
|
||||
import { MAX_RECV, MAX_SENT } from '../../utils/constants';
|
||||
import { urlify } from '../../utils/misc';
|
||||
|
||||
type Props = {
|
||||
requestId: string;
|
||||
|
||||
@@ -38,7 +38,6 @@ export const onSendHeaders = (
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
cache.set(requestId, {
|
||||
...existing,
|
||||
method: details.method as 'GET' | 'POST',
|
||||
@@ -60,7 +59,6 @@ export const onBeforeRequest = (
|
||||
const { method, requestBody, tabId, requestId } = details;
|
||||
|
||||
if (method === 'OPTIONS') return;
|
||||
|
||||
if (requestBody) {
|
||||
const cache = getCacheByTabId(tabId);
|
||||
const existing = cache.get<RequestLog>(requestId);
|
||||
@@ -95,7 +93,6 @@ export const onResponseStarted = (
|
||||
if (method === 'OPTIONS') return;
|
||||
|
||||
const cache = getCacheByTabId(tabId);
|
||||
|
||||
const existing = cache.get<RequestLog>(requestId);
|
||||
const newLog: RequestLog = {
|
||||
requestHeaders: [],
|
||||
|
||||
@@ -52,7 +52,9 @@ export default function Notarize(): ReactElement {
|
||||
//TODO: for some reason, these needs to be override to work
|
||||
headers['Accept-Encoding'] = 'identity';
|
||||
headers['Connection'] = 'close';
|
||||
|
||||
if (req.requestBody) {
|
||||
headers['Content-Length'] = req.requestBody.length.toString();
|
||||
}
|
||||
dispatch(
|
||||
// @ts-ignore
|
||||
notarizeRequest({
|
||||
|
||||
Reference in New Issue
Block a user