Skip to content

Commit

Permalink
temp removed limiter for hetrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mole1424 committed Dec 15, 2023
1 parent 1f41835 commit 95a98e7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from db_schema import Projects, db

dev = False # if true then uses config.txt to set environment variables
dev = True # if true then uses config.txt to set environment variables
if dev:
with open("config.txt", "r") as f:
for line in f.readlines():
Expand Down Expand Up @@ -42,12 +42,12 @@ def wrapper(*args, **kwargs):
return wrapper


limiter = Limiter( # limits the amount of requests per hour (mainly for logging in page for security)
get_remote_address,
app=app,
default_limits=["50 per hour"],
storage_uri="memory://",
)
# limiter = Limiter( # limits the amount of requests per hour (mainly for logging in page for security)
# get_remote_address,
# app=app,
# default_limits=["50 per hour"],
# storage_uri="memory://",
# )

basicConfig(level=INFO) # allows info to be displayed in portainer logs

Expand Down Expand Up @@ -272,7 +272,7 @@ def login():


@app.route(LOGGINGIN_URL, methods=["POST"])
@limiter.limit("50/hour") # limits the amount of requests per hour
# @limiter.limit("50/hour") # limits the amount of requests per hour
def logging_in():
if check_password_hash(password, request.form["password"]):
session["logged_in"] = True
Expand Down

0 comments on commit 95a98e7

Please sign in to comment.