Skip to content

Commit

Permalink
fix: avoid GCS caching the index file
Browse files Browse the repository at this point in the history
  • Loading branch information
rawlingsj committed Mar 9, 2020
1 parent b360088 commit d59e6a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ func (r Repo) uploadIndexFile(i *repo.IndexFile) error {
if err != nil {
return errors.Wrap(err, "writer")
}
// ensure index.yaml is not cached by GCS
w.CacheControl = "no-cache, max-age=0, no-transform"

b, err := yaml.Marshal(i)
if err != nil {
return errors.Wrap(err, "marshal")
Expand Down

0 comments on commit d59e6a4

Please sign in to comment.