Skip to content
This repository was archived by the owner on Apr 18, 2022. It is now read-only.

Commit 3a9ec3f

Browse files
committed
better query number evaluate
1 parent 2df5705 commit 3a9ec3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const options = proxy({
3232
onProxyRes(proxyRes, req, res) {
3333
let IP = req.headers["x-real-ip"];
3434
if (proxyRes.headers['content-type'] && !whitelist.includes(IP)
35-
&& ((req.method == "GET" && Object.keys(req.query).length != 0) || req.method == "POST"))
35+
&& ((req.method == "GET" && Object.keys(req.query).length > 0) || req.method == "POST"))
3636
if (proxyRes.headers['content-type'].includes("text/html")) {
3737
if (!timeoutObject[IP] || timeoutObject[IP]._called)
3838
timeoutObject[IP] = setTimeout(function () {

0 commit comments

Comments
 (0)