forked from jason/cpolis
Simply provide RSS feed when GET request is received
This commit is contained in:
@ -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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user