• Matt Holt's avatar
    proxy: Move handling of headers around to prevent memory usage spikes (#784) · 81e26970
    Matt Holt authored
    * Move handling of headers around to prevent memory use spikes
    
    While debugging #782, I noticed that using http2 and max_fails=0,
    X-Forwarded-For grew infinitely when an upstream request failed after
    refreshing the test page. This change ensures that headers are only
    set once per request rather than appending in a time-terminated loop.
    
    * Refactor some code into its own function
    81e26970
reverseproxy.go 7 KB