走内网,减少流量费用开销,控制请求带宽

NGINX 配置:

server {
    listen 80;
    server_name static.bookstack.cn;
    client_max_body_size 128M;
    location / {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-NginX-Proxy true;
        # #################################################### #
        # 这里的host,必须设置为阿里云OSS分配的内网域名
        proxy_set_header Host bookstack-static.oss-cn-shenzhen-internal.aliyuncs.com;
        # 这里设置为阿里云OSS的endpoint
        proxy_pass http://oss-cn-shenzhen-internal.aliyuncs.com;
        # #################################################### #
        proxy_redirect off;
        # Socket.IO Support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}
05-15 23:21