。unityweb的NGINX设置

问题描述 投票:2回答:1

我已经进行了很多搜索,但是仍然无法解决“如果将Web服务器配置为使用gzip压缩托管.unityweb文件,则可以减少启动时间。”讯息。

[这里是我的简单localhost配置和Chrome Web检查器的屏幕快照。看起来编码正在工作...

谢谢你!

http {
    include       mime.types;
    default_type  application/octet-stream;

    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript application/octet-stream .unityweb;

    server {
        listen       80;
        server_name  localhost;

        location / {
            root   html;
            index  index.html index.htm;
            gzip_static  on;
        }

        location ~ .+\.unityweb$ { 
            add_header Content-Encoding gzip; 
            add_header Content-Type application/octet-stream;
        }
    }
}

Chrome web inspector

unity3d nginx gzip unity-webgl
1个回答
0
投票

关于我的情况清除Web浏览器缓存。解决。

© www.soinside.com 2019 - 2024. All rights reserved.