Added new files

This commit is contained in:
Antonio de la Rosa 2015-12-07 03:39:06 +01:00
commit 18a0d48c8c
31 changed files with 1956 additions and 0 deletions

18
citoplasma/filterip.py Normal file
View file

@ -0,0 +1,18 @@
#!/usr/bin/python3
# A simple utility for filter ips. Only use this if you don't use a server with blocking ips system
from settings import config
from bottle import request
def filterip():
#Check ip
ip = request.environ.get('REMOTE_ADDR')
if ip in config.allowed_ips:
return True
else:
return False