commit
7d8a2592db
@ -117,13 +117,13 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface
|
|||||||
// can use nil skip set
|
// can use nil skip set
|
||||||
|
|
||||||
// default "/"
|
// default "/"
|
||||||
|
tmpPath := "/"
|
||||||
if len(others) > 1 {
|
if len(others) > 1 {
|
||||||
if v, ok := others[1].(string); ok && len(v) > 0 {
|
if v, ok := others[1].(string); ok && len(v) > 0 {
|
||||||
fmt.Fprintf(&b, "; Path=%s", sanitizeValue(v))
|
tmpPath = sanitizeValue(v)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
fmt.Fprintf(&b, "; Path=%s", "/")
|
|
||||||
}
|
}
|
||||||
|
fmt.Fprintf(&b, "; Path=%s", tmpPath)
|
||||||
|
|
||||||
// default empty
|
// default empty
|
||||||
if len(others) > 2 {
|
if len(others) > 2 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user