Skip to content

Commit d4c631f

Browse files
committed
TCLOUD-4780: Add additional metadata header to indicate 404s
This solves a problem when a file created to indicate conditional redirects does not trigger a redirect but instead returns the dummy content.
1 parent 88f5f20 commit d4c631f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/scripts/generate_redirects.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ const createNewS3ObjectAsync = async (dryRun, bucket, prefix, subPath, metadata,
116116
'--key', fullPath,
117117
'--body', newFileTemplate,
118118
'--content-type', 'text/html',
119-
...metadataArgs(metadata)
119+
'--if-none-match', fullPath,
120+
...metadataArgs({...metadata, 'redirect-failure': 'not-found'})
120121
];
121122
const result = await (dryRun ? dryRunSuccess(cmd) : spawnAsync(cmd));
122123
return {

0 commit comments

Comments
 (0)