替换走

subs_filter "src=\"(((?!https).)+?)\.js" "src=\"$1.xpja"  gir;
subs_filter ",(.+?)\.js" ",$1.xpja" gir;

替换回
lua转义用%

set_by_lua $args "

                        rurl = string.gsub(ngx.var.request_uri,'xpja','js')
                        return string.gsub(rurl,'/%?','')

                ";

效果为:

http://xxx.cn/?js=file/script/config.xpja,file/script/common.xpja,file/script/GoMobile.xpja&v=20180919-1125-36

http://xxx.cn/?js=file/script/config.js,file/script/common.js,file/script/GoMobile.js&v=20180919-1125-36