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:
parent
ddd3af4b85
commit
04adf5fdf5
3 changed files with 20 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue