Skip to content

Commit

Permalink
fix preupload 400 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
imzlh committed Jul 13, 2024
1 parent d28df30 commit c81ac54
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ async function main(h:NginxHTTPRequest){
// 文件上传提前检测
if(h.args.action == 'upload' && h.method == 'GET' && h.args.length && h.args.type){
if(!AUTH_IGNORE.includes('upload')){
if(!h.headersIn['Authorization']) return h.return(400, 'Auth required');
if(
!h.headersIn['Authorization'] ||
h.headersIn['Authorization'] != await encrypto(
parseInt(h.args.length),
AUTHKEY,
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@
js_content main.main;
}

保存重启
保存重启

# 加密配置
参考 https://hi.imzlh.top/2024/07/12.cgi

0 comments on commit c81ac54

Please sign in to comment.