[breaking-change] Clear redirects and headers when PATCHing manifest

Without this, whenever _redirects or _headers gets PATCHed, any new values are appended to the old instead of overriding it.
This commit is contained in:
Andrew Cassidy
2026-06-05 00:16:17 -07:00
parent a5f3f2898b
commit 8be2ad0da1
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -100,6 +100,7 @@ func ProcessHeadersFile(ctx context.Context, manifest *Manifest) error {
if headersEntry == nil {
return nil
}
manifest.Headers = []*HeaderRule{}
data, err := GetEntryContents(ctx, headersEntry)
if errors.Is(err, ErrNotRegularFile) {
+1
View File
@@ -104,6 +104,7 @@ func ProcessRedirectsFile(ctx context.Context, manifest *Manifest) error {
if redirectsEntry == nil {
return nil
}
manifest.Redirects = []*RedirectRule{}
data, err := GetEntryContents(ctx, redirectsEntry)
if errors.Is(err, ErrNotRegularFile) {