remove /check-ip

This commit is contained in:
Martin Zimmermann 2014-05-27 17:33:47 +02:00
parent 5d3f178fca
commit 8b5462ed2e
2 changed files with 0 additions and 7 deletions

View File

@ -375,9 +375,6 @@ class TestComments(unittest.TestCase):
# just for the record # just for the record
self.assertEqual(self.post('/id/1/dislike', content_type=js).status_code, 200) self.assertEqual(self.post('/id/1/dislike', content_type=js).status_code, 200)
def testCheckIP(self):
self.assertEqual(self.get('/check-ip').data.decode("utf-8"), '192.168.1.0')
class TestModeratedComments(unittest.TestCase): class TestModeratedComments(unittest.TestCase):

View File

@ -92,7 +92,6 @@ class API(object):
('moderate',('POST', '/id/<int:id>/<any(activate,delete):action>/<string:key>')), ('moderate',('POST', '/id/<int:id>/<any(activate,delete):action>/<string:key>')),
('like', ('POST', '/id/<int:id>/like')), ('like', ('POST', '/id/<int:id>/like')),
('dislike', ('POST', '/id/<int:id>/dislike')), ('dislike', ('POST', '/id/<int:id>/dislike')),
('checkip', ('GET', '/check-ip')),
('demo', ('GET', '/demo')) ('demo', ('GET', '/demo'))
] ]
@ -476,8 +475,5 @@ class API(object):
return JSON(self.comments.count(*data), 200) return JSON(self.comments.count(*data), 200)
def checkip(self, env, req):
return Response(utils.anonymize(str(req.remote_addr)), 200)
def demo(self, env, req): def demo(self, env, req):
return redirect(get_current_url(env) + '/index.html') return redirect(get_current_url(env) + '/index.html')