Skip to content

Commit

Permalink
docs: update reverseproxy.go
Browse files Browse the repository at this point in the history
Defination -> Definition
  • Loading branch information
eltociear authored Oct 26, 2024
1 parent cf14d12 commit 00bfa26
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 00bfa26

Please sign in to comment.