Files
mediaplayer/sentence_api/nginx.conf.example
2026-08-17 10:53:54 +08:00

36 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 本机 Nginx 只提供 HTTP端口 80不在本机终结 HTTPS
# 证书由“总出口”(线上边缘网关)终结,网关把 https://videoservice.d1kt.cn
# 映射到本机内网 IP 的 80 端口,以 HTTP 回源。本机不需要证书,也不要监听 443。
server {
listen 80;
server_name videoservice.d1kt.cn;
client_max_body_size 12g;
client_body_timeout 7200s;
send_timeout 7200s;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 透传边缘网关标记的原始协议https若网关不设置该头可改回 $scheme
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_request_buffering off;
proxy_read_timeout 7200s;
proxy_send_timeout 7200s;
}
location ~ "^/api/v1/videos/[0-9a-fA-F]{64}/content$" {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_force_ranges on;
proxy_buffering off;
}
}