Skip to content

Commit

Permalink
Merge pull request #54 from studiokaiji/fix-secure-mode-url
Browse files Browse the repository at this point in the history
Fix secure mode url
  • Loading branch information
studiokaiji authored Nov 9, 2023
2 parents 5ec07bf + f3d4eaa commit 85e67ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions hostr/cmd/deploy/media.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ type MediaResult struct {
var uploadedMediaFiles = map[string]string{}

func uploadMediaFiles(filePaths []string, requests []*http.Request) {
fmt.Println("Uploading media files...")

client := &http.Client{}

var uploadedMediaFilesCount = 0
Expand Down Expand Up @@ -139,6 +141,7 @@ func uploadMediaFiles(filePaths []string, requests []*http.Request) {
mutex.Lock() // ロックして排他制御
uploadedMediaFilesCount++ // カウントアップ
uploadedMediaFiles[filePath] = result.Url
fmt.Printf("Uploaded %s", filePath)
mutex.Unlock() // ロック解除
}(filePath, req)
}
Expand Down
2 changes: 1 addition & 1 deletion hostr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func main() {
}

defaultModeUrl := "https://h.hostr.cc"
secureModeUrl := fmt.Sprintf("https://%s.h.hostr.cc", npub)
secureModeUrl := fmt.Sprintf("https://%s.hostr.cc", npub)

if replaceable {
defaultModeUrl = fmt.Sprintf("%s/p/%s/d/%s", defaultModeUrl, npub, dTag)
Expand Down

0 comments on commit 85e67ad

Please sign in to comment.