Use `content_type.start_with?("...")` than `content_type =~ /^.../`
`start_with?` is a little faster than regexp for prefix matching by a fixed string.
Showing
想要评论请 注册 或 登录
`start_with?` is a little faster than regexp for prefix matching by a fixed string.