mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-29 07:21:27 +00:00
Added path independent checks as a proof-of-concept
This commit is contained in:
parent
08fd54dfee
commit
9f74fb3d4e
4
main.py
4
main.py
|
@ -13,10 +13,10 @@ def uname():
|
||||||
return jsonify(uname)
|
return jsonify(uname)
|
||||||
@app.route("/getDKIM", methods=["GET"])
|
@app.route("/getDKIM", methods=["GET"])
|
||||||
def getDkimKey():
|
def getDkimKey():
|
||||||
with open("/var/domain") as domainFile:
|
with open("domain") as domainFile:
|
||||||
domain = domainFile.readline()
|
domain = domainFile.readline()
|
||||||
domain = domain.rstrip("\n")
|
domain = domain.rstrip("\n")
|
||||||
dkim = subprocess.check_output(["cat", "/var/dkim/" + domain + ".selector.txt"])
|
dkim = subprocess.check_output(["cat", domain + ".selector.txt"])
|
||||||
return jsonify(dkim)
|
return jsonify(dkim)
|
||||||
@app.route("/pythonVersion", methods=["GET"])
|
@app.route("/pythonVersion", methods=["GET"])
|
||||||
def getPythonVersion():
|
def getPythonVersion():
|
||||||
|
|
Loading…
Reference in a new issue