You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

camo.go 505B

12345678910111213141516171819202122
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package setting
  4. import "code.gitea.io/gitea/modules/log"
  5. var Camo = struct {
  6. Enabled bool
  7. ServerURL string `ini:"SERVER_URL"`
  8. HMACKey string `ini:"HMAC_KEY"`
  9. Allways bool
  10. }{}
  11. func loadCamoFrom(rootCfg ConfigProvider) {
  12. mustMapSetting(rootCfg, "camo", &Camo)
  13. if Camo.Enabled {
  14. if Camo.ServerURL == "" || Camo.HMACKey == "" {
  15. log.Fatal(`Camo settings require "SERVER_URL" and HMAC_KEY`)
  16. }
  17. }
  18. }