Pull request: all: do not redirect to https if not necessary

Merge in DNS/adguard-home from 3558-https-redirect to master

Squashed commit of the following:

commit f656563c0b0db6275748de28bc890dcf85b0e398
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Dec 10 20:44:00 2021 +0300

    all: do not redirect to https if not necessary
This commit is contained in:
Ainar Garipov
2021-12-13 13:48:08 +03:00
parent 86cffcd168
commit a396865869
3 changed files with 6 additions and 3 deletions

View File

@@ -140,7 +140,7 @@ type dnsConfig struct {
type tlsConfigSettings struct {
Enabled bool `yaml:"enabled" json:"enabled"` // Enabled is the encryption (DoT/DoH/HTTPS) status
ServerName string `yaml:"server_name" json:"server_name,omitempty"` // ServerName is the hostname of your HTTPS/TLS server
ForceHTTPS bool `yaml:"force_https" json:"force_https,omitempty"` // ForceHTTPS: if true, forces HTTP->HTTPS redirect
ForceHTTPS bool `yaml:"force_https" json:"force_https"` // ForceHTTPS: if true, forces HTTP->HTTPS redirect
PortHTTPS int `yaml:"port_https" json:"port_https,omitempty"` // HTTPS port. If 0, HTTPS will be disabled
PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls,omitempty"` // DNS-over-TLS port. If 0, DoT will be disabled
PortDNSOverQUIC int `yaml:"port_dns_over_quic" json:"port_dns_over_quic,omitempty"` // DNS-over-QUIC port. If 0, DoQ will be disabled