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:
10
app.go
10
app.go
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user