Skip to content

Commit

Permalink
Drop support for announce via GET
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Mar 6, 2024
1 parent cb8fa58 commit 78e6c48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.py
Expand Up @@ -89,7 +89,7 @@ def geoip():
return resp


@app.route("/announce", methods=["GET", "POST"])
@app.post("/announce")
def announce():
ip = request.remote_addr
if ip.startswith("::ffff:"):
Expand All @@ -98,7 +98,7 @@ def announce():
if ip in app.config["BANNED_IPS"]:
return "Banned (IP).", 403

data = request.values["json"]
data = request.form["json"]

if len(data) > 8192:
return "JSON data is too big.", 413
Expand Down

0 comments on commit 78e6c48

Please sign in to comment.