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

@ -41,6 +41,7 @@ type Feed struct {
BlocklistRules string `json:"blocklist_rules"`
KeeplistRules string `json:"keeplist_rules"`
UserAgent string `json:"user_agent"`
Cookie string `json:"cookie"`
Username string `json:"username"`
Password string `json:"password"`
Disabled bool `json:"disabled"`
@ -121,6 +122,7 @@ type FeedCreationRequest struct {
FeedURL string `json:"feed_url"`
CategoryID int64 `json:"category_id"`
UserAgent string `json:"user_agent"`
Cookie string `json:"cookie"`
Username string `json:"username"`
Password string `json:"password"`
Crawler bool `json:"crawler"`
@ -145,6 +147,7 @@ type FeedModificationRequest struct {
KeeplistRules *string `json:"keeplist_rules"`
Crawler *bool `json:"crawler"`
UserAgent *string `json:"user_agent"`
Cookie *string `json:"cookie"`
Username *string `json:"username"`
Password *string `json:"password"`
CategoryID *int64 `json:"category_id"`
@ -192,6 +195,10 @@ func (f *FeedModificationRequest) Patch(feed *Feed) {
feed.UserAgent = *f.UserAgent
}
if f.Cookie != nil {
feed.Cookie = *f.Cookie
}
if f.Username != nil {
feed.Username = *f.Username
}

View file

@ -8,6 +8,7 @@ package model // import "miniflux.app/model"
type SubscriptionDiscoveryRequest struct {
URL string `json:"url"`
UserAgent string `json:"user_agent"`
Cookie string `json:"cookie"`
Username string `json:"username"`
Password string `json:"password"`
FetchViaProxy bool `json:"fetch_via_proxy"`