diff --git a/internal/commands/start.go b/internal/commands/start.go index 933de5629..503a1dfce 100644 --- a/internal/commands/start.go +++ b/internal/commands/start.go @@ -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())}, } diff --git a/internal/config/flags.go b/internal/config/flags.go index 596a9817a..69d190b27 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -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", diff --git a/internal/config/options.go b/internal/config/options.go index 28e372416..62cc3b5b1 100644 --- a/internal/config/options.go +++ b/internal/config/options.go @@ -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:"-"` diff --git a/internal/config/report.go b/internal/config/report.go index a771cb57d..544c5df78 100644 --- a/internal/config/report.go +++ b/internal/config/report.go @@ -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())},