Error logs flooding terminal output when running the application without a reverse proxy
When running controlcenter without a reverse proxy and without the option -i_know_what_am_doing_not_using_a_reverse_proxy
, the application stderr
is flooded with log messages such as:
ERR src/httpmiddleware/rate_limit.go:65 > Could not obtain the client IP address from the headers. Here they are: http.Header{"Accept":[]string{"application/json, text/plain, */*"}, "Accept-Encoding":[]string{"gzip, deflate"}, "Accept-Language":[]string{"en-US,en;q=0.5"}, "Connection":[]string{"keep-alive"}, "Cookie":[]string{"_pk_ref.3.1fff=%5B%22%22%2C%22%22%2C1631287683%2C%22%23%2F%22%5D; fossil_display_settings=n%3D%2Css%3Dm%2Cadvm%3D0%2Cy%3Dci; _pk_id.3.1fff=27e7c4a80f3562be.1627649042.; metabase.DEVICE=122ce7c1-7cdb-4ac1-be57-c43fff6fc0f4; _ga=GA1.1.294971585.1629282261; controlcenter=MTY0MjU0MTA0MHxOd3dBTkZaU1IxVTFOMUJHU0VKTU5FRlJSazVFU1ZCSFdVUk5TVWxSUzFSSVdUVkdWVFZUTjFCQ1ZVNVlNMVJhUkV0RlNGWllNbEU9fJjQiMNsP1M1F-bVwLylQMDwDvaF9xxwa0FPELVGVxj_; session=EH9QF64zxmxTgvHb6N6spg-zY44acRYiomYCJ9lrglHQYeMd1w; phpMyAdmin=d913c6651c0f088202efee83b62be8c4; org.cups.sid=b4078409a1e3056ed30650fd0c0062d9; metabase.SESSION=6efe0e30-3335-4e5d-9765-8a1b2fd74165; PGADMIN_LANGUAGE=en; ph_phc_WuCKJ0vL2fNge72as4MarP5Y5w13xn3FOZAisy9ofnN_posthog=%7B%22distinct_id%22%3A%22e5f8fe44-16d1-48c0-84c7-6a6387d48260%22%2C%22%24device_id%22%3A%2217b832a89861d7-0129d1046ca134-3469464a-1fa400-17b832a8987148%22%2C%22%24initial_referrer%22%3A%22%24direct%22%2C%22%24initial_referring_domain%22%3A%22%24direct%22%2C%22%24referrer%22%3A%22http%3A%2F%2Flocalhost%3A9999%2F%22%2C%22%24referring_domain%22%3A%22localhost%3A9999%22%2C%22%24session_recording_enabled%22%3Afalse%2C%22%24active_feature_flags%22%3A%5B%5D%2C%22%24user_id%22%3A%22e5f8fe44-16d1-48c0-84c7-6a6387d48260%22%7D"}, "Referer":[]string{"http://localhost:8080/"}, "Sec-Fetch-Dest":[]string{"empty"}, "Sec-Fetch-Mode":[]string{"cors"}, "Sec-Fetch-Site":[]string{"same-origin"}, "User-Agent":[]string{"Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0"}} service=controlcenter
Such lines should use the log level DEBUG
instead of ERROR
.
Edited by Leandro Santiago