1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-07-22 17:18:37 +00:00

Add middleware to read X-Forwarded-Proto header

This commit is contained in:
Frédéric Guillot 2018-04-27 22:25:00 -07:00
parent ddd3af4b85
commit 04adf5fdf5
3 changed files with 20 additions and 4 deletions

View file

@ -34,10 +34,6 @@ func (h *Handler) Use(f ControllerFunc) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
defer timer.ExecutionTime(time.Now(), r.URL.Path)
if r.Header.Get("X-Forwarded-Proto") == "https" {
h.cfg.IsHTTPS = true
}
ctx := NewContext(r, h.store, h.router, h.translator)
request := NewRequest(r)
response := NewResponse(h.cfg, w, r, h.template)