tech5usa / TLSential

A server for providing short-lived TLS certificates to all services within a firewall restricted network.
GNU General Public License v3.0
15 stars 2 forks source link

Add client address to the per-request logging #69

Closed debus closed 4 years ago

debus commented 4 years ago

This PR addresses the following issues:

https://github.com/ImageWare/TLSential/issues/64

Approach

For every request we look if the X-FORWARDED-FOR header is set and use that, falling back to the http.Request.RemoteAddr field if the header isn't set. We then add that address to the log for the request.

Testing

requests with curl. Both with and without the X-FORWARDED-FOR header.