feature/YOBB-add-user-country-header #1

Merged
cheykrym merged 2 commits from feature/YOBB-add-user-country-header into main 2026-02-04 10:44:07 +03:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit bcea539250 - Show all commits

View File

@ -9,7 +9,7 @@ import (
"net/http/httputil" "net/http/httputil"
"net/url" "net/url"
"os" "os"
"strings" "strings"
"yobble-gateway-go/internal/config" "yobble-gateway-go/internal/config"
"yobble-gateway-go/internal/logger" "yobble-gateway-go/internal/logger"

View File

@ -34,9 +34,9 @@ func NewServer(cfg *config.Settings, geoIPService *geoip.GeoIPService) *Server {
//Initialize country middleware //Initialize country middleware
countryMW := &middleware.CountryMW{Geo: geoIPService} countryMW := &middleware.CountryMW{Geo: geoIPService}
// Apply middleware chain // Apply middleware chain
chain := countryMW.AddCountryHeaderIPMiddleware( chain := middleware.RemoveTrailingSlashMiddleware(
middleware.RemoveTrailingSlashMiddleware( middleware.RealIPMiddleware(
middleware.RealIPMiddleware( countryMW.AddCountryHeaderIPMiddleware(
proxyHandler, proxyHandler,
), ),
), ),