8000 chore: record and raise problematic http protocols for each proxy by Emyrk · Pull Request #15917 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

chore: record and raise problematic http protocols for each proxy #15917

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
pre comments
  • Loading branch information
Emyrk committed Dec 19, 2024
commit 62710ae66a6fd9e3b6c404491971c7545423f5a2
6 changes: 4 additions & 2 deletions site/src/contexts/useProxyLatency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ export interface ProxyLatencyReport {
latencyMS: number;
// at is when the latency was recorded.
at: Date;
// nextHopProtocol can determine if HTTP/2 is being used.
// https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol
/**
* nextHopProtocol can determine if HTTP/2 is being used.
* https://developer.mozilla.org/docs/Web/API/PerformanceResourceTiming/nextHopProtocol
*/
nextHopProtocol?: string;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
case "http/1.1":
extraWarnings.push(
// biome-ignore lint/style/useTemplate: easier to read short lines
`Requests to the proxy are using ${latency.nextHopProtocol}, ` +
"the server might not support HTTP/2. " +
`Requests to the proxy from current browser are using "${latency.nextHopProtocol}". ` +
"The proxy server might not support HTTP/2. " +
"For usability reasons, HTTP/2 or above is recommended. " +
"Pages may fail to load if the web browser's concurrent " +
"connection limit is reached.",
"connection limit per host is reached.",
);
}
}
Expand Down Expand Up @@ -134,7 +134,7 @@ const ProxyMessagesRow: FC<ProxyMessagesRowProps> = ({
title={
<span css={{ color: theme.palette.warning.light }}>Warnings</span>
}
messages={proxy.status?.report?.warnings.concat(extraWarnings)}
messages={[...(proxy.status?.report?.warnings ?? []), ...extraWarnings]}
/>
</>
);
Expand Down
Loading
0