diff --git a/README.md b/README.md index ae3d0bf..898d523 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ livenessProbe: | GET_REQUIRE_AUTH | "False" | Whether to require authentication for get requests | | DISABLE_RESIZE | "False" | Disable resizing images | | DISABLE_URL_UPLOAD | "False" | Disable uploading using urls | +| DISABLE_UPLOAD_FORM | "False" | Disable upload form | | UPLOAD_ROUTE | "/" | The route for uploading images | | IMAGES_ROOT | "" | The root for images get requests | diff --git a/app/app.py b/app/app.py index 94a10a3..e65d7a4 100644 --- a/app/app.py +++ b/app/app.py @@ -151,6 +151,8 @@ def resize(img, width, height): @app.route("/", methods=["GET"]) def root(): + if settings.DISABLE_UPLOAD_FORM: + return jsonify(error="Not found"), 404 return f"""