Skip to content

Commit

Permalink
Update request.go
Browse files Browse the repository at this point in the history
Fix CSRF
  • Loading branch information
bypanelcom authored Nov 12, 2019
1 parent de43c03 commit 4abf7f0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func (r *Requester) SetCrumb(ar *APIRequest) error {

if response.StatusCode == 200 && crumbData["crumbRequestField"] != "" {
ar.SetHeader(crumbData["crumbRequestField"], crumbData["crumb"])
ar.SetHeader("Cookie", response.Header.Get("set-cookie"))
}

return nil
Expand Down

0 comments on commit 4abf7f0

Please sign in to comment.