Update Swagger host to port 5005 and harden Gin trusted proxies.

Also add shared nginx config for test.webulgam.com with online-backend path.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-07 18:47:30 +05:00
parent 30bcfefc1e
commit ba53b5b5c2
7 changed files with 98 additions and 9 deletions

10
app.go
View File

@@ -17,7 +17,7 @@ import (
// @title Service APIs
// @version 1.0
// @description Online payment system admin API.
// @host localhost:5050
// @host localhost:5005
// @BasePath /api/admin
// @securityDefinitions.apikey BearerAuth
// @in header
@@ -44,16 +44,16 @@ import (
// @tag.name activity-logs
// @tag.description User activity audit trail
func main() {
cfg := config.GetConfig()
logger := logging.GetLogger()
docs.SwaggerInfo.Title = "Service APIs"
docs.SwaggerInfo.Version = "1.0"
docs.SwaggerInfo.Description = "Online payment system admin API."
docs.SwaggerInfo.Host = "localhost:5050"
docs.SwaggerInfo.Host = "localhost:" + cfg.Listen.Port
docs.SwaggerInfo.BasePath = "/api/admin"
docs.SwaggerInfo.Schemes = []string{"http"}
cfg := config.GetConfig()
logger := logging.GetLogger()
pool := mustConnectPostgresql(cfg, logger)
router := handlermanager.New(cfg, pool, logger)