Skip to content

Commit

Permalink
Add wasm to the default encode options
Browse files Browse the repository at this point in the history
After this change, WebAssembly files will be
encoded (compressed). This is useful because WebAssembly files are
uncompressed.

Pull request #2624 did the same thing 4 years ago but it seems that
the change got lost.
  • Loading branch information
Christoph-D committed Oct 8, 2023
1 parent 5653c36 commit 44610b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions caddytest/integration/caddyfile_adapt/encode_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ encode gzip zstd {
header Content-Type application/xhtml+xml*
header Content-Type application/atom+xml*
header Content-Type application/rss+xml*
header Content-Type application/wasm*
header Content-Type image/svg+xml*
}
}
Expand Down Expand Up @@ -47,6 +48,7 @@ encode {
"application/xhtml+xml*",
"application/atom+xml*",
"application/rss+xml*",
"application/wasm*",
"image/svg+xml*"
]
},
Expand Down
1 change: 1 addition & 0 deletions modules/caddyhttp/encode/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ func (enc *Encode) Provision(ctx caddy.Context) error {
"application/xhtml+xml*",
"application/atom+xml*",
"application/rss+xml*",
"application/wasm*",
"image/svg+xml*",
},
},
Expand Down

0 comments on commit 44610b9

Please sign in to comment.