mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 03:54:59 +08:00
fix (#422): retrocompatibility with authentication middleware
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func NewBool(t bool) *bool {
|
||||
@ -81,3 +82,10 @@ func PrettyPrint(json_dirty []byte) []byte {
|
||||
json_pretty.Write([]byte("\n"))
|
||||
return json_pretty.Bytes()
|
||||
}
|
||||
|
||||
func CookieName(idx int) string {
|
||||
if idx == 0 {
|
||||
return COOKIE_NAME_AUTH
|
||||
}
|
||||
return COOKIE_NAME_AUTH + strconv.Itoa(idx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user