Skip to content

Commit

Permalink
Merge pull request #108 from nitrictech/fix/escaped-forward-slashes
Browse files Browse the repository at this point in the history
fix: use original path value for HttpRequests
  • Loading branch information
tjholm authored Feb 28, 2022
2 parents a566a9b + 9497f52 commit 9964e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/run/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func apiWorkerFilter(apiName string) func(w worker.Worker) bool {
func (s *BaseHttpGateway) api(ctx *fasthttp.RequestCtx) {
apiName := ctx.UserValue("name").(string)
// Rewrite the URL of the request to remove the /api/{name} subroute
pathParts := nitric_utils.SplitPath(string(ctx.Path()))
pathParts := nitric_utils.SplitPath(string(ctx.URI().PathOriginal()))

// remove first two path parts
newPathParts := pathParts[2:]
Expand Down

0 comments on commit 9964e6b

Please sign in to comment.