-
-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathnginx.edge.https.conf.template
43 lines (35 loc) · 1.31 KB
/
nginx.edge.https.conf.template
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
35
36
37
38
39
40
41
42
43
proxy_cache_path /data/nginx-cache levels=1:2 keys_zone=srs_cache:8m max_size=1000m inactive=600m;
proxy_temp_path /data/nginx-cache/tmp;
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate ${ORYX_SSL_CRT};
ssl_certificate_key ${ORYX_SSL_KEY};
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
add_header Strict-Transport-Security "max-age=0";
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
proxy_cache_valid 404 10s;
proxy_cache_lock on;
proxy_cache_lock_age 300s;
proxy_cache_lock_timeout 300s;
proxy_cache_min_uses 1;
location ~ /.+/.*\.(m3u8)$ {
proxy_set_header Host $host;
proxy_pass http://${ORYX_SERVER}$request_uri;
proxy_cache srs_cache;
proxy_cache_key $scheme$proxy_host$uri$args;
proxy_cache_valid 200 302 ${SRS_M3U8_EXPIRE}s;
add_header X-Cache-Status $upstream_cache_status;
}
location ~ /.+/.*\.(ts)$ {
proxy_set_header Host $host;
proxy_pass http://${ORYX_SERVER}$request_uri;
proxy_cache srs_cache;
proxy_cache_key $scheme$proxy_host$uri;
proxy_cache_valid 200 302 ${SRS_TS_EXPIRE}s;
add_header X-Cache-Status $upstream_cache_status;
}
}