moved serverOnly check to composer in RestHandler