fds
This commit is contained in:
parent
e71095f563
commit
86cb4b7c0c
1 changed files with 1 additions and 1 deletions
|
@ -88,7 +88,7 @@ mail = Mail(app)
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
def before_request():
|
def before_request():
|
||||||
if request.host != app.config["SERVER_NAME"]: return {"error":"Unauthorized host provided."}, 401
|
# if request.host != app.config["SERVER_NAME"]: return {"error":"Unauthorized host provided."}, 401
|
||||||
if request.headers.get("CF-Worker"): return {"error":"Cloudflare workers are not allowed to access this website."}, 401
|
if request.headers.get("CF-Worker"): return {"error":"Cloudflare workers are not allowed to access this website."}, 401
|
||||||
|
|
||||||
if request.method.lower() != "get" and app.config["READ_ONLY"]:
|
if request.method.lower() != "get" and app.config["READ_ONLY"]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue