Add a pattern filter for csrf protection