mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
This commit is contained in:
parent
f91269130e
commit
5e0bea8112
|
@ -5,8 +5,8 @@ import "github.com/kataras/iris/v12"
|
|||
func main() {
|
||||
app := iris.New()
|
||||
|
||||
app.Get("/", func(c iris.Context) {
|
||||
c.Writef("Hello %s", "world")
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
ctx.Writef("Hello %s", "world")
|
||||
})
|
||||
|
||||
// This is an Iris-only feature across all web frameworks
|
||||
|
@ -24,7 +24,7 @@ func main() {
|
|||
|
||||
// http://localhost:8080 -> FOUND (Hello world)
|
||||
// http://localhost:8080/other -> NOT FOUND
|
||||
// http://localhost/@ -> NOT FOUND
|
||||
// http://localhost:8080/@ -> NOT FOUND
|
||||
// http://localhost:8080/@kataras -> FOUND (username is kataras)
|
||||
app.Listen(":8080")
|
||||
}
|
||||
|
|
|
@ -267,7 +267,8 @@ func (db *Database) Delete(sid string, key string) (deleted bool) {
|
|||
|
||||
// Clear removes all session key values but it keeps the session entry.
|
||||
func (db *Database) Clear(sid string) error {
|
||||
keys := db.keys(db.makeSID(sid))
|
||||
sid = db.makeSID(sid)
|
||||
keys := db.keys(sid)
|
||||
for _, key := range keys {
|
||||
if key == SessionIDKey {
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue
Block a user