Browse Source

小调整

zjcqoo 6 năm trước cách đây
mục cha
commit
885a847b0f
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      cf-worker/index.js

+ 1 - 2
cf-worker/index.js

@@ -131,8 +131,7 @@ function httpHandler(req, pathname) {
   }
 
   // cfworker 会把路径中的 `//` 合并成 `/`
-  let targetUrlStr = pathname.replace(/^(https?):\/+/, "$1://")
-
+  const targetUrlStr = pathname.replace(/^(https?):\/+/, '$1://')
   try {
     var targetUrlObj = new URL(targetUrlStr)
   } catch (err) {