Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Oct 1, 2023
1 parent 2d4fdb3 commit 4a0aa28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fed/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func (h *postHandler) Handle(w http.ResponseWriter, r *http.Request) {
postID := fmt.Sprintf("https://%s/post/%s", cfg.Domain, filepath.Base(r.URL.Path))

if shouldRedirect(r) {
outbox := fmt.Sprintf("gemini://%s/view/%x", cfg.Domain, sha256.Sum256([]byte(postID)))
h.Log.Info("Redirecting to outbox over Gemini", "outbox", outbox)
url := fmt.Sprintf("gemini://%s/view/%x", cfg.Domain, sha256.Sum256([]byte(postID)))
h.Log.Info("Redirecting to post over Gemini", "url", url)
w.Header().Set("Location", outbox)

Check failure on line 48 in fed/post.go

View workflow job for this annotation

GitHub Actions / ci

undefined: outbox
w.WriteHeader(http.StatusMovedPermanently)
return
Expand Down

0 comments on commit 4a0aa28

Please sign in to comment.