mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:39:25 +08:00
up
This commit is contained in:
@@ -15,6 +15,11 @@ function _M.to_uint8array(content)
|
||||
if len == 0 then
|
||||
return "new Uint8Array([])"
|
||||
end
|
||||
local mode = ngx.var.obf_uint8_b64
|
||||
if mode == "true" or (not mode and len >= 4096) then
|
||||
local b64 = ngx.encode_base64(content)
|
||||
return "(function(){var s='"..b64.."';var b=atob(s);var a=new Uint8Array(b.length);for(var i=0;i<b.length;i++){a[i]=b.charCodeAt(i)};return a;})()"
|
||||
end
|
||||
local arr = {}
|
||||
for i = 1, len do
|
||||
arr[i] = byte(content, i)
|
||||
|
||||
@@ -8,6 +8,8 @@ location / {
|
||||
set $close_close 'true'; # 关闭 关闭开关
|
||||
set $debug_close 'true'; # 关闭 开始调试
|
||||
set $obf_timeout 100; # 缓存时间
|
||||
set $obf_uint8_b64 'true'; # uint8_b64
|
||||
set $obf_skip_large 262144; #
|
||||
if (!-e $request_filename) {
|
||||
rewrite ^(.*)$ /index.php/$1 last;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user