Documentation
¶
Index ¶
Constants ¶
View Source
const SessionKey = "redirect_to"
Variables ¶
This section is empty.
Functions ¶
func ReturnToUrl ¶
Types ¶
type Config ¶
type Config struct {
FallbackPath string
IgnoredPaths []string
IgnoredPrefixes []string
AllowedExtensions []string
IgnoreFunc func(*http.Request) bool
}
Config redirect back config
type RedirectBack ¶
type RedirectBack struct {
Ignore func(req *http.Request) bool
IgnorePath func(pth string) bool
// contains filtered or unexported fields
}
RedirectBack redirect back struct
func (*RedirectBack) Middleware ¶
func (redirectBack *RedirectBack) Middleware() *xroute.Middleware
Middleware returns a RedirectBack middleware instance that record return_to path
func (*RedirectBack) RedirectBack ¶
func (redirectBack *RedirectBack) RedirectBack(w http.ResponseWriter, req *http.Request, fallback ...string)
RedirectBack redirect back to last visited page
Click to show internal directories.
Click to hide internal directories.