Added setup.py
This commit is contained in:
parent
ef0f9e5100
commit
ac27d16cee
73 changed files with 55 additions and 0 deletions
|
|
@ -1,18 +0,0 @@
|
|||
#!/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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue