Update deps

This commit is contained in:
Philipp Heckel 2022-06-16 12:48:43 -04:00
parent 8a56b82813
commit df2362e1a7
5 changed files with 353 additions and 340 deletions

View file

@ -130,6 +130,10 @@ func newRequestFromMatrixJSON(r *http.Request, baseURL string, messageLimit int)
if err != nil {
return nil, &errMatrix{pushKey: pushKey, err: err}
}
newRequest.RemoteAddr = r.RemoteAddr // Not strictly necessary, since visitor was already extracted
if r.Header.Get("X-Forwarded-For") != "" {
newRequest.Header.Set("X-Forwarded-For", r.Header.Get("X-Forwarded-For"))
}
newRequest.Header.Set(matrixPushKeyHeader, pushKey)
return newRequest, nil
}