Skip to content

Commit

Permalink
cOnTeNt TyPe & cOrS
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaraa committed Jan 4, 2024
1 parent 43d6388 commit f6c0a9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions images.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ func handleGetImage(w http.ResponseWriter, r *http.Request) {
for i := 1; i < int(math.Min(float64(count), float64(len(imagesPaths)))); i++ {
images = append(images, getRandomImage(orientation))
}
w.Header().Set("Content-Type", "application/json")
w.Header().Set("Access-Control-Allow-Origin", "*")
_ = json.NewEncoder(w).Encode(map[string]any{
"images": images,
})
Expand Down

0 comments on commit f6c0a9d

Please sign in to comment.