Skip to content

Commit

Permalink
小调整
Browse files Browse the repository at this point in the history
  • Loading branch information
EtherDream committed Jul 25, 2019
1 parent 52bcc47 commit 885a847
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cf-worker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 885a847

Please sign in to comment.