diff --git a/src/octoprint/server/__init__.py b/src/octoprint/server/__init__.py index 810001c6f..a2dde3b46 100644 --- a/src/octoprint/server/__init__.py +++ b/src/octoprint/server/__init__.py @@ -1348,14 +1348,16 @@ class Server(object): ReverseProxiedEnvironment, ) - s = settings() + app.config["TEMPLATES_AUTO_RELOAD"] = True + app.config["JSONIFY_PRETTYPRINT_REGULAR"] = False + + # we must not set this before TEMPLATES_AUTO_RELOAD is set to True or that won't take + app.debug = self._debug # setup octoprint's flask json serialization/deserialization app.json_encoder = OctoPrintJsonEncoder - app.debug = self._debug - app.config["TEMPLATES_AUTO_RELOAD"] = True - app.config["JSONIFY_PRETTYPRINT_REGULAR"] = False + s = settings() secret_key = s.get(["server", "secretKey"]) if not secret_key: