@@ -26,12 +26,30 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
26
26
// All users can see healthy/unhealthy, some can see more.
27
27
let statusBadge = < ProxyStatus proxy = { proxy } /> ;
28
28
let shouldShowMessages = false ;
29
+ const extraWarnings : string [ ] = [ ] ;
30
+ if ( latency ?. nextHopProtocol ) {
31
+ switch ( latency . nextHopProtocol ) {
32
+ case "http/0.9" :
33
+ case "http/1.0" :
34
+ case "http/1.1" :
35
+ extraWarnings . push (
36
+ // biome-ignore lint/style/useTemplate: easier to read short lines
37
+ `Requests to the proxy from current browser are using "${ latency . nextHopProtocol } ". ` +
38
+ "The proxy server might not support HTTP/2. " +
39
+ "For usability reasons, HTTP/2 or above is recommended. " +
40
+ "Pages may fail to load if the web browser's concurrent " +
41
+ "connection limit per host is reached." ,
42
+ ) ;
43
+ }
44
+ }
45
+
29
46
if ( "status" in proxy ) {
30
47
const wsproxy = proxy as WorkspaceProxy ;
31
48
statusBadge = < DetailedProxyStatus proxy = { wsproxy } /> ;
32
49
shouldShowMessages = Boolean (
33
50
( wsproxy . status ?. report ?. warnings &&
34
51
wsproxy . status ?. report ?. warnings . length > 0 ) ||
52
+ extraWarnings . length > 0 ||
35
53
( wsproxy . status ?. report ?. errors &&
36
54
wsproxy . status ?. report ?. errors . length > 0 ) ,
37
55
) ;
@@ -76,7 +94,10 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
76
94
colSpan = { 4 }
77
95
css = { { padding : "0 !important" , borderBottom : 0 } }
78
96
>
79
- < ProxyMessagesRow proxy = { proxy as WorkspaceProxy } />
97
+ < ProxyMessagesRow
98
+ proxy = { proxy as WorkspaceProxy }
99
+ extraWarnings = { extraWarnings }
100
+ />
80
101
</ TableCell >
81
102
</ TableRow >
82
103
) }
@@ -86,9 +107,13 @@ export const ProxyRow: FC<ProxyRowProps> = ({ proxy, latency }) => {
86
107
87
108
interface ProxyMessagesRowProps {
88
109
proxy : WorkspaceProxy ;
110
+ extraWarnings : string [ ] ;
89
111
}
90
112
91
- const ProxyMessagesRow : FC < ProxyMessagesRowProps > = ( { proxy } ) => {
113
+ const ProxyMessagesRow : FC < ProxyMessagesRowProps > = ( {
114
+ proxy,
115
+ extraWarnings,
116
+ } ) => {
92
117
const theme = useTheme ( ) ;
93
118
94
119
return (
@@ -101,7 +126,7 @@ const ProxyMessagesRow: FC<ProxyMessagesRowProps> = ({ proxy }) => {
101
126
title = {
102
127
< span css = { { color : theme . palette . warning . light } } > Warnings</ span >
103
128
}
104
- messages = { proxy . status ?. report ?. warnings }
129
+ messages = { [ ... ( proxy . status ?. report ?. warnings ?? [ ] ) , ... extraWarnings ] }
105
130
/>
106
131
</ >
107
132
) ;
0 commit comments