Skip to content

Commit 1a3c34c

Browse files
Merge pull request #237 from svennergr/fix/display-https-interactions
fix: add HTTPS protocol support to web client
2 parents fa05efd + 397ea98 commit 1a3c34c

4 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/components/detailedRequest/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ const DetailedRequest = memo(({ title, data, view, protocol }: DetailedRequestP)
5858
Copy <CopyIcon />
5959
</button>
6060
<div className="pre_wrapper">
61-
<pre className={protocol === 'http' ? 'language-http' : 'default'}>
61+
<pre className={protocol === 'http' || protocol === 'https' ? 'language-http' : 'default'}>
6262
<code
6363
ref={codeRef}
64-
className={protocol === 'http' ? 'language-http' : 'default'}
64+
className={protocol === 'http' || protocol === 'https' ? 'language-http' : 'default'}
6565
>
6666
{data}
6767
</code>

src/lib/localStorage/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ export const getStoredData = (): StoredData => {
5858
const stored = localStorage.getItem(STORAGE_KEY);
5959
if (stored) {
6060
const parsed = JSON.parse(stored);
61-
return { ...defaultStoredData, ...parsed };
61+
return {
62+
...defaultStoredData,
63+
...parsed,
64+
filter: { ...defaultStoredData.filter, ...parsed.filter },
65+
};
6266
}
6367
} catch (error) {
6468
console.error('Failed to read from localStorage:', error);

src/lib/types/filter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ export type Filter = Record<Protocol, boolean>;
55
export const defaultFilter: Filter = {
66
dns: true,
77
http: true,
8+
https: true,
89
smtp: true,
910
};
1011

src/lib/types/protocol.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const protocols = ['dns', 'http', 'smtp'] as const;
1+
export const protocols = ['dns', 'http', 'https', 'smtp'] as const;
22
export type Protocol = (typeof protocols)[number];
33

44
export const Protocol = {

0 commit comments

Comments
 (0)