Skip to content

Commit

Permalink
Merge pull request #1119 from scooterthedev/deny-local-files
Browse files Browse the repository at this point in the history
Remove the ability to ship local files as a demo
  • Loading branch information
malted authored Jan 23, 2025
2 parents 1bea86a + 28458b8 commit 685d41c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/harbor/shipyard/new-ship-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ export default function NewShipForm({
return
}

if (deploymentUrl.startsWith('file://')) {
toast({
title: "Local file URLs aren't allowed",
description:
'You cannot use a local file as a demo. Try using #cdn instead to host a video or vercel for a deployed project!',
})
setStaging(false)
return
}

const repoUrl = formData.get('repo_url') as string
if (usedRepos.includes(repoUrl)) {
toast({
Expand Down

0 comments on commit 685d41c

Please sign in to comment.