Simply provide RSS feed when GET request is received

This commit is contained in:
2024-04-04 17:13:42 +02:00
parent 532bc6490a
commit e3ce1d7b55
3 changed files with 2 additions and 17 deletions

View File

@ -1,15 +0,0 @@
package view
import (
"net/http"
"path/filepath"
"streifling.com/jason/cpolis/cmd/control"
)
func ShowRSS(c *control.CliArgs) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content-Disposition", "attachment; filename=\""+filepath.Base(c.RSSFile)+"\"")
http.ServeFile(w, r, c.RSSFile)
}
}