1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Add per feed cookies option

This commit is contained in:
Darius 2021-03-23 04:27:58 +01:00 committed by GitHub
parent b0c14aa8f9
commit 9242350f0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 114 additions and 15 deletions

View file

@ -242,6 +242,7 @@ func (e *EntryQueryBuilder) GetEntries() (model.Entries, error) {
f.rewrite_rules,
f.crawler,
f.user_agent,
f.cookie,
fi.icon_id,
u.timezone
FROM
@ -303,6 +304,7 @@ func (e *EntryQueryBuilder) GetEntries() (model.Entries, error) {
&entry.Feed.RewriteRules,
&entry.Feed.Crawler,
&entry.Feed.UserAgent,
&entry.Feed.Cookie,
&iconID,
&tz,
)

View file

@ -195,6 +195,7 @@ func (s *Storage) CreateFeed(feed *model.Feed) error {
last_modified_header,
crawler,
user_agent,
cookie,
username,
password,
disabled,
@ -207,7 +208,7 @@ func (s *Storage) CreateFeed(feed *model.Feed) error {
fetch_via_proxy
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)
RETURNING
id
`
@ -222,6 +223,7 @@ func (s *Storage) CreateFeed(feed *model.Feed) error {
feed.LastModifiedHeader,
feed.Crawler,
feed.UserAgent,
feed.Cookie,
feed.Username,
feed.Password,
feed.Disabled,
@ -282,15 +284,16 @@ func (s *Storage) UpdateFeed(feed *model.Feed) (err error) {
keeplist_rules=$13,
crawler=$14,
user_agent=$15,
username=$16,
password=$17,
disabled=$18,
next_check_at=$19,
ignore_http_cache=$20,
allow_self_signed_certificates=$21,
fetch_via_proxy=$22
cookie=$16,
username=$17,
password=$18,
disabled=$19,
next_check_at=$20,
ignore_http_cache=$21,
allow_self_signed_certificates=$22,
fetch_via_proxy=$23
WHERE
id=$23 AND user_id=$24
id=$24 AND user_id=$25
`
_, err = s.db.Exec(query,
feed.FeedURL,
@ -308,6 +311,7 @@ func (s *Storage) UpdateFeed(feed *model.Feed) (err error) {
feed.KeeplistRules,
feed.Crawler,
feed.UserAgent,
feed.Cookie,
feed.Username,
feed.Password,
feed.Disabled,

View file

@ -159,6 +159,7 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
f.keeplist_rules,
f.crawler,
f.user_agent,
f.cookie,
f.username,
f.password,
f.ignore_http_cache,
@ -218,6 +219,7 @@ func (f *FeedQueryBuilder) GetFeeds() (model.Feeds, error) {
&feed.KeeplistRules,
&feed.Crawler,
&feed.UserAgent,
&feed.Cookie,
&feed.Username,
&feed.Password,
&feed.IgnoreHTTPCache,