middleware backend check