Permanent HTTP redirects are replaces with non-refreshing HTML page with
the link, to make you explicitly allow that step. Temporary redirects
are followed if it is neither @url{https://newsboat.org/, Newsboat}
+nor @url{https://www.feeder.stargrave.org/, go.stargrave.org/feeder}
user-agent, not image paths.
@item
".webp": {},
}
-func isNewsboat(req *http.Request) bool {
- return strings.Contains(req.Header.Get("User-Agent"), "newsboat/")
+func isFeeder(req *http.Request) bool {
+ if strings.Contains(req.Header.Get("User-Agent"), "newsboat/") {
+ return true
+ }
+ if strings.Contains(req.Header.Get("User-Agent"), "go.stargrave.org-feeder/") {
+ return true
+ }
+ return false
}
func RoundRedirectHTML(
case http.StatusMovedPermanently, http.StatusPermanentRedirect:
redirType = "permanent"
case http.StatusFound, http.StatusSeeOther, http.StatusTemporaryRedirect:
- if isNewsboat(req) {
+ if isFeeder(req) {
return true, nil
}
if _, ok := imageExts[filepath.Ext(req.URL.Path)]; ok {