Skip to content

Commit

Permalink
check protocol and hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Oct 24, 2024
1 parent 24e00a3 commit ee17c2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vercel/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,10 @@ export default function vercelAdapter({
}

function isAcceptedPattern(pattern: any): pattern is RemotePattern {
if (pattern?.port.statsWith('http') || pattern?.port.startsWith('https')) {
if (!pattern?.hostname) {
return false;
}
if (pattern?.protocol?.statsWith('http') || pattern?.protocol?.startsWith('https')) {
return true;
}
return false;
Expand Down

0 comments on commit ee17c2f

Please sign in to comment.