added in database active record and post method for checking headers