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/url"
"os"
"strings"
"strings"
"yobble-gateway-go/internal/config"
"yobble-gateway-go/internal/logger"

View File

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