Config: Change position of "http-cache-public" command flag

Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
Michael Mayer 2023-10-26 09:04:34 +02:00
parent 5ca40cb94c
commit 19efee9b6d
4 changed files with 8 additions and 8 deletions

View file

@ -60,9 +60,9 @@ func startAction(ctx *cli.Context) error {
{"detach-server", fmt.Sprintf("%t", conf.DetachServer())},
{"http-mode", conf.HttpMode()},
{"http-compression", conf.HttpCompression()},
{"http-cache-public", fmt.Sprintf("%t", conf.HttpCachePublic())},
{"http-cache-maxage", fmt.Sprintf("%d", conf.HttpCacheMaxAge())},
{"http-video-maxage", fmt.Sprintf("%d", conf.HttpVideoMaxAge())},
{"http-cache-public", fmt.Sprintf("%t", conf.HttpCachePublic())},
{"http-host", conf.HttpHost()},
{"http-port", fmt.Sprintf("%d", conf.HttpPort())},
}

View file

@ -491,6 +491,11 @@ var Flags = CliFlags{
Usage: "Web server compression `METHOD` (gzip, none)",
EnvVar: EnvVar("HTTP_COMPRESSION"),
}}, {
Flag: cli.BoolFlag{
Name: "http-cache-public",
Usage: "allow static content to be cached by a CDN or caching proxy",
EnvVar: EnvVar("HTTP_CACHE_PUBLIC"),
}}, {
Flag: cli.IntFlag{
Name: "http-cache-maxage",
Value: int(ttl.Default),
@ -503,11 +508,6 @@ var Flags = CliFlags{
Usage: "time in `SECONDS` until cached videos expire",
EnvVar: EnvVar("HTTP_VIDEO_MAXAGE"),
}}, {
Flag: cli.BoolFlag{
Name: "http-cache-public",
Usage: "allow static content to be cached by a CDN or caching proxy",
EnvVar: EnvVar("HTTP_CACHE_PUBLIC"),
}}, {
Flag: cli.StringFlag{
Name: "http-host, ip",
Value: "0.0.0.0",

View file

@ -113,9 +113,9 @@ type Options struct {
TLSKey string `yaml:"TLSKey" json:"TLSKey" flag:"tls-key"`
HttpMode string `yaml:"HttpMode" json:"-" flag:"http-mode"`
HttpCompression string `yaml:"HttpCompression" json:"-" flag:"http-compression"`
HttpCachePublic bool `yaml:"HttpCachePublic" json:"HttpCachePublic" flag:"http-cache-public"`
HttpCacheMaxAge int `yaml:"HttpCacheMaxAge" json:"HttpCacheMaxAge" flag:"http-cache-maxage"`
HttpVideoMaxAge int `yaml:"HttpVideoMaxAge" json:"HttpVideoMaxAge" flag:"http-video-maxage"`
HttpCachePublic bool `yaml:"HttpCachePublic" json:"HttpCachePublic" flag:"http-cache-public"`
HttpHost string `yaml:"HttpHost" json:"-" flag:"http-host"`
HttpPort int `yaml:"HttpPort" json:"-" flag:"http-port"`
HttpSocket string `yaml:"-" json:"-" flag:"-"`

View file

@ -160,9 +160,9 @@ func (c *Config) Report() (rows [][]string, cols []string) {
{"tls-key", c.TLSKey()},
{"http-mode", c.HttpMode()},
{"http-compression", c.HttpCompression()},
{"http-cache-public", fmt.Sprintf("%t", c.HttpCachePublic())},
{"http-cache-maxage", fmt.Sprintf("%d", c.HttpCacheMaxAge())},
{"http-video-maxage", fmt.Sprintf("%d", c.HttpVideoMaxAge())},
{"http-cache-public", fmt.Sprintf("%t", c.HttpCachePublic())},
{"http-host", c.HttpHost()},
{"http-port", fmt.Sprintf("%d", c.HttpPort())},