Skip to content

Commit

Permalink
add new process function (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtomcej authored and unrolled committed Jan 3, 2019
1 parent 87cf339 commit 76e6d4e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions secure.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ func (s *Secure) Process(w http.ResponseWriter, r *http.Request) error {
return err
}

// ProcessNoModifyRequest runs the actual checks but does not write the headers in the ResponseWriter.
func (s *Secure) ProcessNoModifyRequest(w http.ResponseWriter, r *http.Request) (http.Header, *http.Request, error) {
return s.processRequest(w, r)
}

// processRequest runs the actual checks on the request and returns an error if the middleware chain should stop.
func (s *Secure) processRequest(w http.ResponseWriter, r *http.Request) (http.Header, *http.Request, error) {
// Setup nonce if required.
Expand Down

0 comments on commit 76e6d4e

Please sign in to comment.