Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Endware functionality #51

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
removed: unnecessary variable in Extend
  • Loading branch information
Mohammad Oweis committed Mar 25, 2020
commit af47edeb703cfcfe80e25dda2e8e42e3e60907e8
3 changes: 1 addition & 2 deletions chain.go
Original file line number Diff line number Diff line change
@@ -125,10 +125,9 @@ func (c Chain) Append(constructors ...Constructor) Chain {
// // requests to aHtml hitting nosurfs failure handler go:
// m1 -> nosurf -> m2 -> csrfFail -> e1
func (c Chain) Extend(chain Chain) Chain {
newC := c.
return c.
Append(chain.constructors...).
AppendEndware(chain.endwares...)
return newC
}

// Endware is functionality executed after a the main handler is called