♻️ RoadSign v2 #6

Merged
LittleSheep merged 14 commits from refactor/v2 into master 2024-01-26 05:32:06 +00:00
Showing only changes of commit bfce13fc74 - Show all commits

View File

@ -95,6 +95,8 @@ func UseProxies(app *fiber.App) {
} }
func makeResponse(ctx *fiber.Ctx, region *navi.Region, location *navi.Location, dest *navi.Destination) error { func makeResponse(ctx *fiber.Ctx, region *navi.Region, location *navi.Location, dest *navi.Destination) error {
uri := ctx.Request().URI().String()
// Modify request // Modify request
for _, transformer := range dest.Transformers { for _, transformer := range dest.Transformers {
if err := transformer.TransformRequest(ctx); err != nil { if err := transformer.TransformRequest(ctx); err != nil {
@ -123,7 +125,7 @@ func makeResponse(ctx *fiber.Ctx, region *navi.Region, location *navi.Location,
Region: region.ID, Region: region.ID,
Location: location.ID, Location: location.ID,
Destination: dest.ID, Destination: dest.ID,
Uri: ctx.OriginalURL(), Uri: uri,
IpAddress: ctx.IP(), IpAddress: ctx.IP(),
UserAgent: ctx.Get(fiber.HeaderUserAgent), UserAgent: ctx.Get(fiber.HeaderUserAgent),
Error: navi.RoadTraceError{ Error: navi.RoadTraceError{