Skip to content

Commit 9369a75

Browse files
committed
as per review and fix docs
Signed-off-by: Andrew Thornton <[email protected]>
1 parent 0c547f0 commit 9369a75

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cmd/web_https.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func toTLSVersion(version string) uint16 {
2222
return tls.VersionTLS10
2323
case "tlsv1.1":
2424
return tls.VersionTLS11
25-
case "tlsv1.2":
25+
case "tlsv1.2", "": // Set TLSv1.2 as our default
2626
return tls.VersionTLS12
2727
case "tlsv1.3":
2828
return tls.VersionTLS13

custom/conf/app.example.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ RUN_MODE = ; prod
5252
;PORT_TO_REDIRECT = 80
5353
;;
5454
;; Minimum and maximum supported TLS versions
55-
;SSL_MIN_VERSION=tls12
55+
;SSL_MIN_VERSION=TLSv1.2
5656
;SSL_MAX_VERSION=
5757
;;
5858
;; SSL Curve Preferences

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
310310

311311
- `REDIRECT_OTHER_PORT`: **false**: If true and `PROTOCOL` is https, allows redirecting http requests on `PORT_TO_REDIRECT` to the https port Gitea listens on.
312312
- `PORT_TO_REDIRECT`: **80**: Port for the http redirection service to listen on. Used when `REDIRECT_OTHER_PORT` is true.
313-
- `SSL_MIN_VERSION`: **tls12**: Set the minimum version of ssl support.
313+
- `SSL_MIN_VERSION`: **TLSv1.2**: Set the minimum version of ssl support.
314314
- `SSL_MAX_VERSION`: **\<empty\>**: Set the maximum version of ssl support.
315315
- `SSL_CURVE_PREFERENCES`: **X25519,P256**: Set the prefered curves,
316316
- `SSL_CIPHER_SUITES`: **ecdhe_ecdsa_with_aes_256_gcm_sha384,ecdhe_rsa_with_aes_256_gcm_sha384,ecdhe_ecdsa_with_aes_128_gcm_sha256,ecdhe_rsa_with_aes_128_gcm_sha256,ecdhe_ecdsa_with_chacha20_poly1305,ecdhe_rsa_with_chacha20_poly1305**: Set the preferred cipher suites.

modules/setting/setting.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,8 +622,8 @@ func NewContext() {
622622
}
623623
LetsEncryptDirectory = sec.Key("LETSENCRYPT_DIRECTORY").MustString("https")
624624
LetsEncryptEmail = sec.Key("LETSENCRYPT_EMAIL").MustString("")
625-
SSLMinimumVersion = sec.Key("SSL_MIN_VERSION").In("tls12", []string{"tls10", "tls11", "tls12", "tls13"})
626-
SSLMaximumVersion = sec.Key("SSL_MAX_VERSION").In("", []string{"tls10", "tls11", "tls12", "tls13"})
625+
SSLMinimumVersion = sec.Key("SSL_MIN_VERSION").MustString("")
626+
SSLMaximumVersion = sec.Key("SSL_MAX_VERSION").MustString("")
627627
SSLCurvePreferences = sec.Key("SSL_CURVE_PREFERENCES").Strings(",")
628628
SSLCipherSuites = sec.Key("SSL_CIPHER_SUITES").Strings(",")
629629
Domain = sec.Key("DOMAIN").MustString("localhost")

0 commit comments

Comments
 (0)