mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add feed option to ignore HTTP cache
This commit is contained in:
parent
57f62b4797
commit
6c6ca69141
23 changed files with 105 additions and 52 deletions
|
@ -14,17 +14,18 @@ import (
|
|||
|
||||
// FeedForm represents a feed form in the UI
|
||||
type FeedForm struct {
|
||||
FeedURL string
|
||||
SiteURL string
|
||||
Title string
|
||||
ScraperRules string
|
||||
RewriteRules string
|
||||
Crawler bool
|
||||
UserAgent string
|
||||
CategoryID int64
|
||||
Username string
|
||||
Password string
|
||||
Disabled bool
|
||||
FeedURL string
|
||||
SiteURL string
|
||||
Title string
|
||||
ScraperRules string
|
||||
RewriteRules string
|
||||
Crawler bool
|
||||
UserAgent string
|
||||
CategoryID int64
|
||||
Username string
|
||||
Password string
|
||||
IgnoreHTTPCache bool
|
||||
Disabled bool
|
||||
}
|
||||
|
||||
// ValidateModification validates FeedForm fields
|
||||
|
@ -49,6 +50,7 @@ func (f FeedForm) Merge(feed *model.Feed) *model.Feed {
|
|||
feed.ParsingErrorMsg = ""
|
||||
feed.Username = f.Username
|
||||
feed.Password = f.Password
|
||||
feed.IgnoreHTTPCache = f.IgnoreHTTPCache
|
||||
feed.Disabled = f.Disabled
|
||||
return feed
|
||||
}
|
||||
|
@ -61,16 +63,17 @@ func NewFeedForm(r *http.Request) *FeedForm {
|
|||
}
|
||||
|
||||
return &FeedForm{
|
||||
FeedURL: r.FormValue("feed_url"),
|
||||
SiteURL: r.FormValue("site_url"),
|
||||
Title: r.FormValue("title"),
|
||||
ScraperRules: r.FormValue("scraper_rules"),
|
||||
UserAgent: r.FormValue("user_agent"),
|
||||
RewriteRules: r.FormValue("rewrite_rules"),
|
||||
Crawler: r.FormValue("crawler") == "1",
|
||||
CategoryID: int64(categoryID),
|
||||
Username: r.FormValue("feed_username"),
|
||||
Password: r.FormValue("feed_password"),
|
||||
Disabled: r.FormValue("disabled") == "1",
|
||||
FeedURL: r.FormValue("feed_url"),
|
||||
SiteURL: r.FormValue("site_url"),
|
||||
Title: r.FormValue("title"),
|
||||
ScraperRules: r.FormValue("scraper_rules"),
|
||||
UserAgent: r.FormValue("user_agent"),
|
||||
RewriteRules: r.FormValue("rewrite_rules"),
|
||||
Crawler: r.FormValue("crawler") == "1",
|
||||
CategoryID: int64(categoryID),
|
||||
Username: r.FormValue("feed_username"),
|
||||
Password: r.FormValue("feed_password"),
|
||||
IgnoreHTTPCache: r.FormValue("ignore_http_cache") == "1",
|
||||
Disabled: r.FormValue("disabled") == "1",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue