From b82a5fe3d033af5988afd812815d8e665cbacd5a Mon Sep 17 00:00:00 2001 From: Illia Chub Date: Tue, 5 Jan 2021 13:27:00 +0200 Subject: [PATCH] Added response encoding --- main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 609b602..2708d7d 100644 --- a/main.py +++ b/main.py @@ -19,10 +19,8 @@ def getDkimKey(): domain = domain.rstrip("\n") catProcess = subprocess.Popen(["cat", "/var/dkim/" + domain + ".selector.txt"], stdout=subprocess.PIPE) dkim = catProcess.communicate()[0] - #dkim = str(dkim, "utf-8") - #dkim = base64.b64encode(dkim) - print(dkim) - return "0" + dkim = base64.b64encode(dkim) + return jsonify(dkim) @app.route("/pythonVersion", methods=["GET"]) def getPythonVersion(): pythonVersion = subprocess.check_output(["python","--version"])