Skip to content

Commit

Permalink
Merge pull request #358 from eltociear/patch-1
Browse files Browse the repository at this point in the history
Fixed typo in reverseproxy.go
  • Loading branch information
tobychui authored Oct 26, 2024
2 parents cf14d12 + 00bfa26 commit 95d0a98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/reverseproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ func HandleCustomHeaderAdd(w http.ResponseWriter, r *http.Request) {
return
}

//Create a Custom Header Defination type
//Create a Custom Header Definition type
var rewriteDirection dynamicproxy.HeaderDirection
if direction == "toOrigin" {
rewriteDirection = dynamicproxy.HeaderDirection_ZoraxyToUpstream
Expand All @@ -1187,15 +1187,15 @@ func HandleCustomHeaderAdd(w http.ResponseWriter, r *http.Request) {
if rewriteType == "remove" {
isRemove = true
}
headerRewriteDefination := dynamicproxy.UserDefinedHeader{
headerRewriteDefinition := dynamicproxy.UserDefinedHeader{
Key: name,
Value: value,
Direction: rewriteDirection,
IsRemove: isRemove,
}

//Create a new custom header object
err = targetProxyEndpoint.AddUserDefinedHeader(&headerRewriteDefination)
err = targetProxyEndpoint.AddUserDefinedHeader(&headerRewriteDefinition)
if err != nil {
utils.SendErrorResponse(w, "unable to add header rewrite rule: "+err.Error())
return
Expand Down

0 comments on commit 95d0a98

Please sign in to comment.