Use regexes to match ALPN protocols (#5651)

nginx presents the client's list of ALPN protocols as
$ssl_preread_alpn_protocols, a comma-separated string.  Use regular
expressions to match each item in the list, rather than the exact value
of the entire list at once.
This commit is contained in:
Dara Poon 2020-04-05 07:23:43 -07:00 committed by GitHub
parent f66a919e08
commit 0e16008085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -11,9 +11,8 @@ stream {
}
# since 1.13.10
map $ssl_preread_alpn_protocols $upstream {
"h2" web;
"http/1.1" web;
"h2,http/1.1" web;
~\bh2\b web;
~\bhttp/1\. web;
default turn;
}