(cherry picked from commit a7813275a5)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
This commit is contained in:
co-authored by
Marcus Efraimsson
parent
445909a759
commit
088125ae28
@@ -67,6 +67,18 @@ type DataSource struct {
|
||||
Updated time.Time `json:"updated"`
|
||||
}
|
||||
|
||||
// AllowedCookies parses the jsondata.keepCookies and returns a list of
|
||||
// allowed cookies, otherwise an empty list.
|
||||
func (ds DataSource) AllowedCookies() []string {
|
||||
if ds.JsonData != nil {
|
||||
if keepCookies := ds.JsonData.Get("keepCookies"); keepCookies != nil {
|
||||
return keepCookies.MustStringArray()
|
||||
}
|
||||
}
|
||||
|
||||
return []string{}
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
// COMMANDS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user