mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
Add an example for sessions + securecookie. Relative: http://support.iris-go.com/d/29-mark-cookie-for-session-as-secure
Former-commit-id: 10c30aabdf6b8fa59457ed8296b3e87108d3861c
This commit is contained in:
@@ -81,18 +81,6 @@ func IsValidCookieDomain(domain string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func encodeCookieValue(value string) string {
|
||||
return base64.URLEncoding.EncodeToString([]byte(value))
|
||||
}
|
||||
|
||||
func decodeCookieValue(value string) (string, error) {
|
||||
v, err := base64.URLEncoding.DecodeString(value)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(v), nil
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// -------------------------------------------------------------------------------------
|
||||
// ----------------------------------Strings & Serialization----------------------------
|
||||
|
||||
Reference in New Issue
Block a user