Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

migrations.go 966B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package setting
  5. var (
  6. // Migrations settings
  7. Migrations = struct {
  8. MaxAttempts int
  9. RetryBackoff int
  10. AllowedDomains string
  11. BlockedDomains string
  12. AllowLocalNetworks bool
  13. SkipTLSVerify bool
  14. }{
  15. MaxAttempts: 3,
  16. RetryBackoff: 3,
  17. }
  18. )
  19. func newMigrationsService() {
  20. sec := Cfg.Section("migrations")
  21. Migrations.MaxAttempts = sec.Key("MAX_ATTEMPTS").MustInt(Migrations.MaxAttempts)
  22. Migrations.RetryBackoff = sec.Key("RETRY_BACKOFF").MustInt(Migrations.RetryBackoff)
  23. Migrations.AllowedDomains = sec.Key("ALLOWED_DOMAINS").MustString("")
  24. Migrations.BlockedDomains = sec.Key("BLOCKED_DOMAINS").MustString("")
  25. Migrations.AllowLocalNetworks = sec.Key("ALLOW_LOCALNETWORKS").MustBool(false)
  26. Migrations.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool(false)
  27. }