Skip to content

Commit

Permalink
Add missing Access-Control-Allow-Origin header for get request
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonford committed Dec 27, 2022
1 parent e449507 commit 168b36e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fakestorage/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,7 @@ func (s *Server) downloadObject(w http.ResponseWriter, r *http.Request) {
w.Header().Set("X-Goog-Generation", strconv.FormatInt(obj.Generation, 10))
w.Header().Set("X-Goog-Hash", fmt.Sprintf("crc32c=%s,md5=%s", obj.Crc32c, obj.Md5Hash))
w.Header().Set("Last-Modified", obj.Updated.Format(http.TimeFormat))
w.Header().Set("Access-Control-Allow-Origin", "*")

if ranged && !satisfiable {
status = http.StatusRequestedRangeNotSatisfiable
Expand Down

0 comments on commit 168b36e

Please sign in to comment.