fix slash issue, add commonmiddleware