Skip to content

Commit 5b4b305

Browse files
csrf exempt data endpoint
1 parent ee2c593 commit 5b4b305

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
csrf = CSRFProtect(app)
2020

21-
2221
def validate_pow(nonce, data, difficulty):
2322
# Calculate the sha256 of the concatenated string of 32-bit X-Nonce header and raw body.
2423
# This calculation has to match the code on the client side, in index.html.
@@ -117,6 +116,7 @@ def trigger_rebuild():
117116
return jsonify({"error": "Internal Server Error"}), 500
118117

119118
@app.route("/data/<path:name>")
119+
@csrf.exempt
120120
def download_file(name):
121121
return send_from_directory(
122122
"data", name, as_attachment=True

0 commit comments

Comments
 (0)