Optionally return rel="canonical" header (#542)

* set rel="canonical" header

* check scheme before setting canonical headers, add documentation
This commit is contained in:
snowcall
2021-03-09 14:08:22 +03:00
committed by GitHub
parent 768cb1e868
commit 56d3f6d897
3 changed files with 11 additions and 0 deletions

View File

@@ -209,6 +209,7 @@ type config struct {
TTL int
CacheControlPassthrough bool
SetCanonicalHeader bool
SoReuseport bool
@@ -360,6 +361,7 @@ func configure() error {
intEnvConfig(&conf.TTL, "IMGPROXY_TTL")
boolEnvConfig(&conf.CacheControlPassthrough, "IMGPROXY_CACHE_CONTROL_PASSTHROUGH")
boolEnvConfig(&conf.SetCanonicalHeader, "IMGPROXY_SET_CANONICAL_HEADER")
boolEnvConfig(&conf.SoReuseport, "IMGPROXY_SO_REUSEPORT")