MCPcopy Create free account
hub / github.com/gogs/gogs / RedirectSubpath

Method RedirectSubpath

internal/context/context.go:145–147  ·  view source on GitHub ↗

RedirectSubpath responses redirection with given location and status. It prepends setting.Server.Subpath to the location string.

(location string, status ...int)

Source from the content-addressed store, hash-verified

143// RedirectSubpath responses redirection with given location and status.
144// It prepends setting.Server.Subpath to the location string.
145func (c *Context) RedirectSubpath(location string, status ...int) {
146 c.Redirect(conf.Server.Subpath+location, status...)
147}
148
149// RenderWithErr used for page has form validation but need to prompt error to users.
150func (c *Context) RenderWithErr(msg string, status int, tpl string, f any) {

Callers 15

ToggleFunction · 0.80
LoginFunction · 0.80
afterLoginFunction · 0.80
LoginPostFunction · 0.80
LoginTwoFactorPostFunction · 0.80
SignOutFunction · 0.80
SignUpPostFunction · 0.80
ActivateFunction · 0.80
ActivateEmailFunction · 0.80
ResetPasswdPostFunction · 0.80
SettingsPostFunction · 0.80

Calls 1

RedirectMethod · 0.95

Tested by

no test coverage detected