Closed jwthanh closed 7 years ago
You can disable the CSRF completely from here - if you only want to apply it to certain routes, you can change the handlers around so only certain middleware apply to certain routes: https://github.com/blue-jay/blueprint/blob/master/lib/boot/middleware.go#L17
All the settings for CSRF can be set here: https://github.com/blue-jay/blueprint/blob/master/lib/boot/xsrf.go#L25
Thank you, so I must disable the CSRF completely then apply it to certain routes that I want to handle CSRF?
Yes, that is correct.
Which commit are you using? e65ca2b
Which operating system, processor architecture, and Go version are you using (
go env
)? Mac OS X 10.12.4 Golang 1.7.5What did you do? Create new module to implement Restful API
What did you expect to see? Disable CSRF on only API module
What did you actually see? Every POST request require a valid CSRF token