app.ini 重要参数增加

This commit is contained in:
xxq250 2026-07-29 00:31:32 +08:00
parent 5281667f34
commit 95e7597ad2
2 changed files with 45 additions and 37 deletions

View File

@ -66,6 +66,7 @@ SSH_LISTEN_PORT = 22
LFS_START_SERVER = true
LFS_JWT_SECRET = n2kib4qdArULO57JW0jD2Ygm3z1ehzI8Y4zVfbxouyY
OFFLINE_MODE = false
PUBLIC_URL_DETECTION = never
[mailer]
ENABLED = false
@ -83,6 +84,9 @@ DEFAULT_ENABLE_TIMETRACKING = true
NO_REPLY_ADDRESS = noreply.example.org
SHOW_REGISTRATION_BUTTON = false
[service.explore]
REQUIRE_SIGNIN_VIEW = true
[webhook]
ALLOWED_HOST_LIST = *
@ -119,12 +123,12 @@ DEFAULT_PAGING_NUM = 200
MAX_RESPONSE_ITEMS = 200
[git]
PATH =
PATH =
DISABLE_DIFF_HIGHLIGHT = false
MAX_GIT_DIFF_LINES = 1000
MAX_GIT_DIFF_LINE_CHARACTERS = 5000
MAX_GIT_DIFF_FILES = 100
GC_ARGS =
GC_ARGS =
EnableAutoGitWireProtocol = true
COMMITS_RANGE_SIZE = 50
@ -172,3 +176,7 @@ ENABLED = true
[ssh.minimum_key_sizes]
RSA = 2048
[actions]
ENABLED = true
WORKFLOW_DIRS = .gitlink/workflows,.ci/workflows

70
main.go
View File

@ -1,57 +1,57 @@
package main
import (
"os"
"runtime"
"strings"
"time"
"os"
"runtime"
"strings"
"time"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
hat_cmd "code.gitlink.org.cn/Gitlink/gitea_hat.git/cmd"
"code.gitea.io/gitea/modules/setting"
hat_cmd "code.gitlink.org.cn/Gitlink/gitea_hat.git/cmd"
// register supported doc types
_ "code.gitea.io/gitea/modules/markup/asciicast"
_ "code.gitea.io/gitea/modules/markup/console"
_ "code.gitea.io/gitea/modules/markup/csv"
_ "code.gitea.io/gitea/modules/markup/markdown"
_ "code.gitea.io/gitea/modules/markup/orgmode"
// register supported doc types
_ "code.gitea.io/gitea/modules/markup/asciicast"
_ "code.gitea.io/gitea/modules/markup/console"
_ "code.gitea.io/gitea/modules/markup/csv"
_ "code.gitea.io/gitea/modules/markup/markdown"
_ "code.gitea.io/gitea/modules/markup/orgmode"
"github.com/urfave/cli/v3"
"github.com/urfave/cli/v3"
)
var (
Version = "v3.1.1, by v1.26.2, 20260728 "
Tags = ""
MakeVersion = ""
Version = "v3.1.2, by v1.26.2, 20260729 "
Tags = ""
MakeVersion = ""
)
func init() {
setting.AppVer = Version
setting.AppBuiltWith = formatBuiltWith()
setting.AppStartTime = time.Now().UTC()
// Grab the original help templates
setting.AppVer = Version
setting.AppBuiltWith = formatBuiltWith()
setting.AppStartTime = time.Now().UTC()
// Grab the original help templates
}
func main() {
cli.OsExiter = func(code int) {
cli.OsExiter = func(code int) {
log.GetManager().Close()
os.Exit(code)
}
app := hat_cmd.NewMainApp(Version, formatBuiltWith())
_ = hat_cmd.RunMainApp(app, os.Args...) // all errors should have been handled by the RunMainApp
log.GetManager().Close()
os.Exit(code)
}
app := hat_cmd.NewMainApp(Version, formatBuiltWith())
_ = hat_cmd.RunMainApp(app, os.Args...) // all errors should have been handled by the RunMainApp
log.GetManager().Close()
}
func formatBuiltWith() string {
version := runtime.Version()
if len(MakeVersion) > 0 {
version = MakeVersion + ", " + runtime.Version()
}
if len(Tags) == 0 {
return " built with " + version
}
version := runtime.Version()
if len(MakeVersion) > 0 {
version = MakeVersion + ", " + runtime.Version()
}
if len(Tags) == 0 {
return " built with " + version
}
return " built with " + version + " : " + strings.ReplaceAll(Tags, " ", ", ")
return " built with " + version + " : " + strings.ReplaceAll(Tags, " ", ", ")
}