mirror of https://github.com/gogs/gogs.git
Minor fix for PR #3667
parent
c47fbc629b
commit
16d3e7085e
|
@ -3,7 +3,7 @@ Gogs - Go Git Service [
|
||||
|
||||
##### Current tip version: 0.9.106 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
|
||||
##### Current tip version: 0.9.107 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions ~~or submit a task on [alpha stage automated binary building system](https://build.gogs.io/)~~)
|
||||
|
||||
| Web | UI | Preview |
|
||||
|:-------------:|:-------:|:-------:|
|
||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
|||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.9.106.1222"
|
||||
const APP_VER = "0.9.107.1222"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -118,7 +118,7 @@ var (
|
|||
MirrorQueueLength int
|
||||
PullRequestQueueLength int
|
||||
PreferredLicenses []string
|
||||
DisableHTTPGit bool
|
||||
DisableHTTPGit bool `ini:"DISABLE_HTTP_GIT"`
|
||||
|
||||
// Repository editor settings
|
||||
Editor struct {
|
||||
|
@ -495,7 +495,6 @@ func NewContext() {
|
|||
|
||||
// Determine and create root git repository path.
|
||||
sec = Cfg.Section("repository")
|
||||
Repository.DisableHTTPGit = sec.Key("DISABLE_HTTP_GIT").MustBool()
|
||||
RepoRootPath = sec.Key("ROOT").MustString(path.Join(homeDir, "gogs-repositories"))
|
||||
forcePathSeparator(RepoRootPath)
|
||||
if !filepath.IsAbs(RepoRootPath) {
|
||||
|
|
|
@ -484,6 +484,7 @@ func HTTPBackend(ctx *context.Context, cfg *serviceConfig) http.HandlerFunc {
|
|||
w.Write([]byte("Interacting with repositories by HTTP protocol is not allowed"))
|
||||
return
|
||||
}
|
||||
|
||||
if route.method != r.Method {
|
||||
if r.Proto == "HTTP/1.1" {
|
||||
w.WriteHeader(http.StatusMethodNotAllowed)
|
||||
|
|
|
@ -1 +1 @@
|
|||
0.9.106.1222
|
||||
0.9.107.1222
|
|
@ -26,11 +26,7 @@
|
|||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
{{if not $.DisableHTTP}}
|
||||
<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
|
||||
{{else}}
|
||||
<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
|
||||
{{end}}
|
||||
<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
|
|
|
@ -61,11 +61,7 @@
|
|||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
{{if not $.DisableHTTP}}
|
||||
<input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
|
||||
{{else}}
|
||||
<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
|
||||
{{end}}
|
||||
<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
|
|
|
@ -39,11 +39,7 @@
|
|||
SSH
|
||||
</button>
|
||||
{{end}}
|
||||
{{if not $.DisableHTTP}}
|
||||
<input id="repo-clone-url" value="{{$.WikiCloneLink.HTTPS}}" readonly>
|
||||
{{else}}
|
||||
<input id="repo-clone-url" value="{{$.WikiCloneLink.SSH}}" readonly>
|
||||
{{end}}
|
||||
<input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
|
||||
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
|
||||
<i class="octicon octicon-clippy"></i>
|
||||
</button>
|
||||
|
|
Loading…
Reference in New Issue