mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-24 21:53:39 +09:00
1. remove useless options 2. set AppDataPath instead of repo root path 3. make "disable self-registration" default enabled 4. avoid writing corrupted ini file 5. avoid auto-sign-in the existing admin user
29 lines
697 B
Go
29 lines
697 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package setting
|
|
|
|
// API settings
|
|
var API = struct {
|
|
EnableSwagger bool
|
|
SwaggerURL string
|
|
MaxResponseItems int
|
|
DefaultPagingNum int
|
|
DefaultGitTreesPerPage int
|
|
DefaultMaxBlobSize int64
|
|
DefaultMaxResponseSize int64
|
|
}{
|
|
EnableSwagger: true,
|
|
SwaggerURL: "",
|
|
MaxResponseItems: 50,
|
|
DefaultPagingNum: 30,
|
|
DefaultGitTreesPerPage: 1000,
|
|
DefaultMaxBlobSize: 10485760,
|
|
DefaultMaxResponseSize: 104857600,
|
|
}
|
|
|
|
func loadAPIFrom(rootCfg ConfigProvider) {
|
|
mustMapSetting(rootCfg, "api", &API)
|
|
API.SwaggerURL = AppURL + "api/swagger"
|
|
}
|