adicionado middleware

Signed-off-by: Michael Liang <ml09@inf.ufpr.br>