properly target middleware to specific http methods