mirror of
https://github.com/yurymuski/nginx-http3.git
synced 2026-09-26 22:16:10 +00:00
readme added demo site, example upd
This commit is contained in:
@@ -46,4 +46,12 @@ Sent QUIC client Initial, ALPN: h3-25h3-24h3-23
|
|||||||
>
|
>
|
||||||
< HTTP/3 200
|
< HTTP/3 200
|
||||||
HTTP/3 200
|
HTTP/3 200
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Demo
|
||||||
|
|
||||||
|
- Site: http3.yurets.pro
|
||||||
|
|
||||||
|
- Online test: [http3check](https://www.http3check.net/?host=http3.yurets.pro)
|
||||||
|
|
||||||
|
- Shell: `docker run -it --rm ymuski/curl-http3 curl -ILv https://http3.yurets.pro/ --http3`
|
||||||
|
|||||||
+4
-2
@@ -20,7 +20,7 @@ http {
|
|||||||
server_name your_domain;
|
server_name your_domain;
|
||||||
|
|
||||||
# Add Alt-Svc header to negotiate HTTP/3.
|
# Add Alt-Svc header to negotiate HTTP/3.
|
||||||
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400';
|
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
|
||||||
|
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ http {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Add Alt-Svc header to negotiate HTTP/3.
|
# Add Alt-Svc header to negotiate HTTP/3.
|
||||||
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400';
|
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
root html;
|
root html;
|
||||||
@@ -61,6 +61,8 @@ http {
|
|||||||
location /host {
|
location /host {
|
||||||
return 200 "http3 on $hostname";
|
return 200 "http3 on $hostname";
|
||||||
add_header Content-Type text/plain;
|
add_header Content-Type text/plain;
|
||||||
|
# Add Alt-Svc header to negotiate HTTP/3.
|
||||||
|
add_header alt-svc 'h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user