ajuste ip
This commit is contained in:
parent
8abb65ad02
commit
a199438e53
1 changed files with 0 additions and 10 deletions
|
|
@ -107,15 +107,6 @@ func NewRouter() http.Handler {
|
|||
applicationHandler := handlers.NewApplicationHandler(applicationService)
|
||||
paymentHandler := handlers.NewPaymentHandler(credentialsService)
|
||||
|
||||
// --- IP HELPER ---
|
||||
GetClientIP := func(r *http.Request) string {
|
||||
forwarded := r.Header.Get("X-Forwarded-For")
|
||||
if forwarded != "" {
|
||||
return forwarded
|
||||
}
|
||||
return r.RemoteAddr
|
||||
}
|
||||
|
||||
// --- HEALTH CHECK ---
|
||||
mux.HandleFunc("GET /health", func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusOK)
|
||||
|
|
@ -132,7 +123,6 @@ func NewRouter() http.Handler {
|
|||
|
||||
response := map[string]interface{}{
|
||||
"message": "🐴 GoHorseJobs API is running!",
|
||||
"ip": GetClientIP(r),
|
||||
"docs": "/docs",
|
||||
"health": "/health",
|
||||
"version": "1.0.0",
|
||||
|
|
|
|||
Loading…
Reference in a new issue