diff --git a/frontends/ycdl_flask/backend/common.py b/frontends/ycdl_flask/backend/common.py index a109cae..c7b23fb 100644 --- a/frontends/ycdl_flask/backend/common.py +++ b/frontends/ycdl_flask/backend/common.py @@ -41,8 +41,7 @@ site.localhost_only = False @site.before_request def before_request(): - ip = request.remote_addr - request.is_localhost = ip == '127.0.0.1' + request.is_localhost = (request.remote_addr == '127.0.0.1') if site.localhost_only and not request.is_localhost: flask.abort(403)