mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
minor version 11.2.2 - register sessions as middleware and Context.HTML/Text like Context.Writef
Former-commit-id: 6f5f1c502fb06d739c350c3ecc891f495dc03a6e
This commit is contained in:
@@ -28,6 +28,12 @@ func main() {
|
||||
})
|
||||
|
||||
app.Get("/execute", func(ctx iris.Context) {
|
||||
if !none.IsOnline() {
|
||||
ctx.Values().Set("from", "/execute with offline access")
|
||||
ctx.Exec("NONE", "/invisible/iris")
|
||||
return
|
||||
}
|
||||
|
||||
// same as navigating to "http://localhost:8080/invisible/iris" when /change has being invoked and route state changed
|
||||
// from "offline" to "online"
|
||||
ctx.Values().Set("from", "/execute") // values and session can be shared when calling Exec from a "foreign" context.
|
||||
|
||||
Reference in New Issue
Block a user