fsd
This commit is contained in:
parent
84c3708e10
commit
12e600028c
1 changed files with 0 additions and 5 deletions
|
@ -65,7 +65,6 @@ r=redis.Redis(host=environ.get("REDIS_URL", "redis://localhost"), decode_respons
|
||||||
|
|
||||||
def get_CF() -> str:
|
def get_CF() -> str:
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
print('real: ' + request.headers.get('CF-Connecting-IP'))
|
|
||||||
return request.headers.get('CF-Connecting-IP')
|
return request.headers.get('CF-Connecting-IP')
|
||||||
|
|
||||||
limiter = Limiter(
|
limiter = Limiter(
|
||||||
|
@ -88,10 +87,6 @@ mail = Mail(app)
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def before_request():
|
def before_request():
|
||||||
print('first: ' + request.access_route[0])
|
|
||||||
print('second: ' + request.remote_addr)
|
|
||||||
print('third: ' + request.headers.get('CF-Connecting-IP'))
|
|
||||||
|
|
||||||
if request.method.lower() != "get" and app.config["READ_ONLY"]:
|
if request.method.lower() != "get" and app.config["READ_ONLY"]:
|
||||||
return {"error":f"{app.config['SITE_NAME']} is currently in read-only mode."}, 500
|
return {"error":f"{app.config['SITE_NAME']} is currently in read-only mode."}, 500
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue