For whatever reason Go doesn't fill r.URL.Scheme. So let's get it directly from Scheme header that is being set in nginx's proxy_set_header Scheme $scheme.
This commit is contained in:
parent
98e948f982
commit
6895c1c0a6
@ -168,8 +168,14 @@ func (h *Handlers) RSS(w http.ResponseWriter, r *http.Request) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
var scheme string
|
||||||
|
if r.Header.Get("Scheme") != "" {
|
||||||
|
scheme = r.Header.Get("Scheme")
|
||||||
|
} else {
|
||||||
|
scheme = "http"
|
||||||
|
}
|
||||||
|
|
||||||
web.RSS(r.URL.Scheme+"://"+r.Host, "Arav", posts, r, w)
|
web.RSS(scheme+"://"+r.Host, "Arav", posts, r, w)
|
||||||
}
|
}
|
||||||
|
|
||||||
func FaviconIco(w http.ResponseWriter, r *http.Request) {
|
func FaviconIco(w http.ResponseWriter, r *http.Request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user