This commit is contained in:
2
main.go
2
main.go
@@ -190,7 +190,7 @@ func main() {
|
|||||||
w.Header().Set("Cache-Control", "public; max-age=60")
|
w.Header().Set("Cache-Control", "public; max-age=60")
|
||||||
w.Header().Set("Content-Disposition", "attachment; filename=\""+fileName+"\"")
|
w.Header().Set("Content-Disposition", "attachment; filename=\""+fileName+"\"")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
json.NewEncoder(w).Encode(content)
|
io.Copy(w, content)
|
||||||
} else {
|
} else {
|
||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
authKey := r.Header.Get("Authorization")
|
authKey := r.Header.Get("Authorization")
|
||||||
|
|||||||
Reference in New Issue
Block a user