aboutsummaryrefslogtreecommitdiff
path: root/pkg/context/context.go
Commit message (Collapse)AuthorAge
* internal: move packages under this directory (#5836)Unknwon2019-10-24
| | | | | | | | | | | | | | | | | | * Rename pkg -> internal * Rename routes -> route * Move route -> internal/route * Rename models -> db * Move db -> internal/db * Fix route2 -> route * Move cmd -> internal/cmd * Bump version
* Enable Go modules (#5835)Unknwon2019-10-23
| | | | | | | | | | | | | | | | * Remove vendor * Enable Go modules * ci: add command to fetch dependencies * ci: update setting * ci: update settings * Require Go 1.11 * Rename module name to gogs.io/gogs
* pkg/context: change banner file path (#5750)unknwon2019-07-28
|
* pkg/context: Render live notice banner from file (#5750)Achilleas Koutsou2019-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pkg/context: Render live notice banner from file - Contexter checks if there is a file called 'notice' under the GOGS_CUSTOM directory and loads it. - The first line is treated as a header/title and everything else as the message body. - Message body is rendered as HTML (tags allowed). - File size is limited to 1024 bytes. - File mime type must be text. - Notice is rendered in head.tmpl for all pages. * pkg/context: Rename maxlen to maxSize Rename maxlen to maxSize for the maximum size (in bytes) of the notice file to render. Define the variable when needed to avoid instantiating it when the file doesn't exist. Co-Authored-By: ᴊ. ᴄʜᴇɴ <u@gogs.io> * pkg/context: Package name after license header Co-Authored-By: ᴊ. ᴄʜᴇɴ <u@gogs.io> * pkg/context: Don't print 'Found notice file' Becomes too verbose as it prints on every page load when the file exists. * pkg/context: Match project conventions Import order and grouping Variable names: fileloc -> fpath fp -> f finfo -> fi * pkg/context: Remove empty line Co-Authored-By: ᴊ. ᴄʜᴇɴ <u@gogs.io> * pkg/context: Render notice as markdown Server notice file should be named 'notice.md'. The contents of the file are treated as markdown and rendered as a warning message at the top of every page. * Update notice.go Co-authored-by: ᴊ. ᴄʜᴇɴ <u@gogs.io>
* pkg/context: use host address and apply insecure flag for go-get=1 when ↵Unknwon2018-12-03
| | | | needed (#5305)
* pkg/context: expose port in import path for 'go-get=1' (#5305)Unknwon2018-12-03
|
* api: fix critical CSRF vulnerabilities on API routes (#5355)Unknwon2018-11-28
| | | | By explicitly requires token authentication.
* routes/repo/issue: fix redirect with unexpected escape (#5443)Unknwon2018-09-30
|
* pkg/context: apply EscapePound at context levelUnknwon2018-09-28
| | | | | | Always escape template variable {{.Link}} variable and redirect calls. Relates to #5442
* repo_editor: able to trigger Git hooks (#4338)Unknwon2018-08-17
|
* repo: minor improve for PR #5219 and support UTF-8 byte countUnknwon2018-06-11
|
* *: rename "gogits" to "gogs"Unknwon2018-05-27
|
* pkg/context: add doctype to go-get=1 response (#4938)Drahoslav Bednář2018-03-06
|
* repo: fix go-get meta tags (#4832)Unknwon2017-11-16
| | | | | The first part in go-import should be the root import path. It included subpath when 'go get' with a subpath and was not correct.
* repo/pull: detect case when no merge base found (#4434)Unknwon2017-06-05
|
* Refactoring: rename ctx -> cUnknwon2017-06-03
|
* repo: always response go-get meta when requested (#1878)Unknwon2017-06-03
|
* repo/editor: fix wrong context for subdirectory (#4368)Unknwon2017-04-07
|
* user/setting: simplify codeUnknwon2017-04-07
|
* Refactoring: rename Signed -> LoggedUnknwon2017-04-06
|
* pkg/setting: rename {AppUrl, AppSubUrl} -> {AppURL, AppSubURL}Unknwon2017-04-06
|
* pkg/context: rename {CsrfToken, CsrfTokenHtml} -> {CSRFToken, CSRFTokenHTML}Unknwon2017-04-06
|
* 2fa: initial support (#945)Unknwon2017-04-06
|
* Refactoring: remove tool.TplNameUnknwon2017-04-05
|
* Refactoring: rename pkg/base -> pkg/toolUnknwon2017-04-05
|
* Refactoring: rename modules -> pkgUnknwon2017-04-04
Reasons to change: 1. Shorter than 'modules' 2. More generally used by other Go projects 3. Corresponds to the naming of '$GOPATH/pkg' directory