Skip to content

Commit

Permalink
fix: handle auth fail freshrss, add doc (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyfedwards authored Feb 1, 2025
1 parent 551de68 commit 604ed69
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ backends:
password: muchstrong
```

#### FreshRSS
To use freshrss you need to enable API access and set the API password explicitly, separate to your user password.
1. To enable the API go to Settings > Authentication > Allow API access.
1. You can set the API password in Settings > Profile > API password.

### Openers
By default links are opened in the browser, you can specify commands to open certain links based on a regex string.
`regex` can be any valid golang regex string, it will be matched against the feed item link.
Expand Down
4 changes: 4 additions & 0 deletions internal/config/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func getFreshRSSFeeds(config *FreshRSSBackend) ([]Feed, error) {
return []Feed{}, err
}

if resp.StatusCode < 200 || resp.StatusCode > 299 {
return []Feed{}, fmt.Errorf("could not login to freshrss, statusCode: %d", resp.StatusCode)
}

body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return []Feed{}, err
Expand Down

0 comments on commit 604ed69

Please sign in to comment.