forked from fholzer/docker-nginx-brotli
-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathhttps.conf
34 lines (26 loc) · 880 Bytes
/
https.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# https://www.nginx.com/blog/introducing-technology-preview-nginx-support-for-quic-http-3/
server {
# quic and http/3
listen 443 quic reuseport;
# http/2 and http/1.1
listen 443 ssl;
http2 on;
server_name localhost;
# openssl-generated pair for local development
# https://letsencrypt.org/docs/certificates-for-localhost/
ssl_certificate /etc/nginx/ssl/localhost.crt;
ssl_certificate_key /etc/nginx/ssl/localhost.key;
# TLSv1.3 is required for QUIC.
ssl_protocols TLSv1.2 TLSv1.3;
# 0-RTT QUIC connection resumption
ssl_early_data on;
# Add Alt-Svc header to negotiate HTTP/3.
add_header alt-svc 'h3=":8889"; ma=86400';
add_header QUIC-Status $http3; # Sent when QUIC was used
location / {
root /static;
gzip_static on;
brotli_static on;
expires 1d;
}
}