Skip to content

Commit

Permalink
Trim origin.custom|s3.path error strings slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetikonline committed Nov 1, 2023
1 parent a5e59b8 commit 5db763f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ function payloadVerifyRequestOrigin(payload) {

// ensure `origin.custom.path` is valid
if (!isValidPath(custom.path)) {
throw new Error(`payload property [origin.custom.path] must begin with, but not end with a forward slash - got [${custom.path}]`);
throw new Error(`payload property [origin.custom.path] must begin, but not end with a forward slash - got [${custom.path}]`);
}

// ensure `origin.custom.port` is within bounds
Expand Down Expand Up @@ -561,7 +561,7 @@ function payloadVerifyRequestOrigin(payload) {

// ensure `origin.s3.path` is valid
if (!isValidPath(s3.path)) {
throw new Error(`payload property [origin.s3.path] must begin with, but not end with a forward slash - got [${s3.path}]`);
throw new Error(`payload property [origin.s3.path] must begin, but not end with a forward slash - got [${s3.path}]`);
}
}
}
Expand Down

0 comments on commit 5db763f

Please sign in to comment.