register middleware as string