diff --git a/schort.py b/schort.py index 4a0d6e4..e57cb6a 100755 --- a/schort.py +++ b/schort.py @@ -5,10 +5,11 @@ from urllib.parse import urlparse app = Flask(__name__) +# HEAD is implicit with flask @app.route('/', methods=['GET', 'POST']) @app.route('/', methods=['GET', 'POST']) def short(shortLink=""): - if request.method == "GET": + if request.method == "GET" or request.method == "HEAD": if shortLink: noauto = shortLink[-1] == "+" if noauto: shortLink = shortLink[:-1]