@marcel91200 / caddy Mirror · read-only
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 11, 02:15 UTC

master
go 28 lines 741 Bytes
Raw
1 package caddyzstd
2
3 import (
4 "github.com/caddyserver/caddy/v2"
5 "github.com/caddyserver/caddy/v2/modules/caddyhttp/encode"
6 )
7
8 func init() {
9 caddy.RegisterModule(ZstdPrecompressed{})
10 }
11
12 // ZstdPrecompressed provides the file extension for files precompressed with zstandard encoding.
13 type ZstdPrecompressed struct {
14 Zstd
15 }
16
17 // CaddyModule returns the Caddy module information.
18 func (ZstdPrecompressed) CaddyModule() caddy.ModuleInfo {
19 return caddy.ModuleInfo{
20 ID: "http.precompressed.zstd",
21 New: func() caddy.Module { return new(ZstdPrecompressed) },
22 }
23 }
24
25 // Suffix returns the filename suffix of precompressed files.
26 func (ZstdPrecompressed) Suffix() string { return ".zst" }
27
28 var _ encode.Precompressed = (*ZstdPrecompressed)(nil)