feat: handle X-Forward-For for log output
- add Gorilla handlers package for enhanced HTTP handling - refactor HTTP server to use a new ServeMux for routing - update ListenAndServe to utilize ProxyHeaders for better proxy support - add RealIP field to client model - use RealIP fild for connect/disconnect log output
This commit is contained in:
parent
dd9490bb3b
commit
44a64bfce4
6 changed files with 17 additions and 7 deletions
|
@ -14,7 +14,8 @@ type ClientCommand struct {
|
|||
|
||||
// Represents a single client
|
||||
type WebsocketClient struct {
|
||||
Conn *websocket.Conn
|
||||
Conn *websocket.Conn
|
||||
RealIP string
|
||||
}
|
||||
|
||||
// Sends a message to the websocket.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue