nginx 配置js加版本号 避免未更新情况

281 阅读1分钟

nginx 配置js加版本号 避免未更新情况

        location ~ \.(js)$ {
            root    D:/las_jmcw_app/html;
            if ($query_string !~ 'v=20221208'){
                rewrite ^(.*)$ http://xxxxxxxx$1?v=20221208 permanent;
            }
        }