summarylogtreecommitdiffstats
path: root/http3.conf
blob: f76037e921ae73d6c16b483be9cab8d9b88cd5d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# EXAMPLE OF USING HTTP/3
server {
    # Enable QUIC and HTTP/3.
    listen 443 quic reuseport;

    # Enable HTTP/2 (optional).
    listen 443 ssl http2;

    ssl_certificate      cert.crt;
    ssl_certificate_key  cert.key;

    # Enable all TLS versions (TLSv1.3 is required for QUIC).
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;

    # Add Alt-Svc header to negotiate HTTP/3.
    add_header alt-svc 'h3-23=":443"; ma=86400';
}