Commit Graph

7 Commits

Author SHA1 Message Date
dcarrillo 2e32a20f60 refactor: dependency injection instead of package globals (#57)
* refactor: export Settings type, Setup returns value

* refactor: resolver.Setup takes explicit Settings struct

* refactor: GetHeadersWithoutTrustedHeaders takes explicit header params

* refactor: server constructors take narrow config

* refactor: Router struct with handler methods, remove geoSvc global

* refactor: wire DI through main, remove setting.App references

* refactor: remove App global, use returned Settings

* refactor: update router tests for DI

* chore: fix lint issues — rename ServerTimeouts to Timeouts, fix shadowed variables
2026-07-21 18:37:21 +02:00
dcarrillo b5fe362183 Make geo database usage optional (#39) 2025-01-02 20:13:41 +01:00
dcarrillo d13ea29071 New whatismydns feature (#29) 2024-04-12 19:26:48 +02:00
dcarrillo 1ee7256506 Remove headers set by a trusted proxy from outputs 2022-05-02 18:07:40 +02:00
dcarrillo 7c70abf07f Add feature to get the right client port when using a trusted proxy 2022-05-02 17:56:57 +02:00
dcarrillo 9070e9a2c2 Use Accept request header instead of user agent to figure out non-browser clients. Funny fact, I borrowed the idea from a fork ('https://github.com/hachmeister/whatismyip/blob/8a3e142cf3ebf54ed3a4b6de2173cc5b13b40e18/router/generic.go#L33') 2022-04-30 17:35:12 +02:00
dcarrillo 2fcfa91545 first commit 2021-11-10 20:06:12 +01:00