Rest with middleware import