Skip to content

Commit af9ea32

Browse files
committed
Add cdn-cache-control header
1 parent a5e4b30 commit af9ea32

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Plugins/VercelPackager/VercelOutput.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ extension VercelOutput {
515515
let buildOutputPath = Path(buildPathOutput.replacingOccurrences(of: "/workspace", with: context.package.directory.string))
516516

517517
// build the product
518-
let buildCommand = "swift build -c release --product \(product.name) --static-swift-stdlib"
518+
let buildCommand = "swift build -c release -Xswiftc -Osize --product \(product.name) --static-swift-stdlib"
519519
try Shell.execute(
520520
executable: dockerToolPath,
521521
arguments: [

Sources/Vercel/Types.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public enum HTTPHeaderKey: String, Sendable {
7171
case age = "age"
7272
case authorization = "authorization"
7373
case cacheControl = "cache-control"
74+
case cdnCacheControl = "cdn-cache-control"
7475
case connection = "connection"
7576
case contentDisposition = "content-disposition"
7677
case contentEncoding = "content-encoding"
@@ -105,6 +106,7 @@ public enum HTTPHeaderKey: String, Sendable {
105106
case upgrade = "upgrade"
106107
case userAgent = "user-agent"
107108
case vary = "vary"
109+
case vercelCdnCacheControl = "vercel-cdn-cache-control"
108110
case via = "via"
109111
case xCache = "x-cache"
110112
case xCacheHits = "x-cache-hits"

0 commit comments

Comments
 (0)