chore: add 'Access-Control-Allow-Origin' header to put response
This commit is contained in:
@@ -73,6 +73,7 @@ func (s *Server) upload(path string, w http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
w.Header().Add("Access-Control-Expose-Headers", "X-File-URL")
|
||||
w.Header().Add("Access-Control-Allow-Origin", "*")
|
||||
fileUrl := filepath.Join(s.returnUrl, path)
|
||||
w.Header().Add("X-File-URL", fileUrl)
|
||||
s.logger.Infof("success - file is available at %s", fileUrl)
|
||||
|
||||
Reference in New Issue
Block a user