This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f23af2
commit 30d1cf7
Showing
3 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import { | ||
Box, | ||
Code, | ||
ListItem, | ||
Table, | ||
Tbody, | ||
Td, | ||
Text, | ||
Th, | ||
Thead, | ||
Tr, | ||
UnorderedList | ||
} from '@chakra-ui/react'; | ||
import {Note} from '../../components/Note'; | ||
|
||
export const HttpConnection = ({type}) => { | ||
return ( | ||
<Box> | ||
<Text mb="6">The router supports {type} connections over:</Text> | ||
<UnorderedList mb="6" spacing={4}> | ||
<ListItem>HTTP/1.1</ListItem> | ||
<ListItem>HTTP/1.1 with TLS</ListItem> | ||
<ListItem>HTTP/2 with TLS</ListItem> | ||
<ListItem> | ||
HTTP/2 Cleartext protocol (h2c). This uses HTTP/2 over plaintext | ||
connections. | ||
</ListItem> | ||
</UnorderedList> | ||
<Text mb="6"> | ||
Use the table below to look up the resulting protocol of a {type}{' '} | ||
connection, based on the {type === 'subgraph' ? 'subgraph' : ''} URL and | ||
the <Code>experimental_http2</Code> configuration: | ||
</Text> | ||
<Table variant="simple" mb="6"> | ||
<Thead> | ||
<Tr> | ||
<Th></Th> | ||
<Th> | ||
URL with <Code>http://</Code> | ||
</Th> | ||
<Th> | ||
URL with <Code>https://</Code> | ||
</Th> | ||
</Tr> | ||
</Thead> | ||
<Tbody> | ||
<Tr> | ||
<Td> | ||
<Code>experimental_http2:</Code> | ||
<Code> disable</Code> | ||
</Td> | ||
<Td>HTTP/1.1</Td> | ||
<Td>HTTP/1.1 with TLS</Td> | ||
</Tr> | ||
<Tr> | ||
<Td> | ||
<Code>experimental_http2:</Code> | ||
<Code> enable</Code> | ||
</Td> | ||
<Td>HTTP/1.1</Td> | ||
<Td> | ||
Either HTTP/1.1 or HTTP/2 with TLS, as determined by the TLS | ||
handshake | ||
</Td> | ||
</Tr> | ||
<Tr> | ||
<Td> | ||
<Code>experimental_http2:</Code> | ||
<Code> http2only</Code> | ||
</Td> | ||
<Td>h2c</Td> | ||
<Td>HTTP/2 with TLS</Td> | ||
</Tr> | ||
<Tr> | ||
<Td> | ||
<Code>experimental_http2</Code> | ||
<br /> | ||
not set | ||
</Td> | ||
<Td>HTTP/1.1</Td> | ||
<Td> | ||
Either HTTP/1.1 or HTTP/2 with TLS, as determined by the TLS | ||
handshake | ||
</Td> | ||
</Tr> | ||
</Tbody> | ||
</Table> | ||
<Note> | ||
<Text> | ||
Configuring <Code>experimental_http2: http2only</Code> for a{' '} | ||
{type === 'coprocessor' ? 'network' : 'subgraph'} that doesn't | ||
support HTTP/2 results in a failed {type} connection. | ||
</Text> | ||
</Note> | ||
</Box> | ||
); | ||
}; | ||
|
||
HttpConnection.propTypes = { | ||
type: PropTypes.string.isRequired | ||
}; |