Skip to content

Commit

Permalink
Add extra content headers
Browse files Browse the repository at this point in the history
  • Loading branch information
abatilo committed Aug 27, 2023
1 parent 5f0ea53 commit 623b36b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ func main() {
http.ListenAndServe(":80", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "public, max-age=604800")
w.Header().Set("Content-Type", "application/pdf")
w.Header().Set("Content-Disposition", "inline; filename=\"resume.pdf\"")
w.Header().Set("Content-Transfer-Encoding", "binary")
w.Header().Set("Content-Length", string(len(resume)))
w.Write(resume)
}))
}

0 comments on commit 623b36b

Please sign in to comment.