]>
git.gir.st - subscriptionfeed.git/blob - app/anticaptcha/__init__.py
1 from flask
import Blueprint
, request
, g
, url_for
2 from werkzeug
.exceptions
import NotFound
3 from urllib
.parse
import urljoin
8 from ..common
.common
import cf
9 from ..common
.anticsrf
import no_csrf_protection
11 from .lib
import solve_captcha
13 frontend
= Blueprint("anticaptcha", __name__
)
15 @frontend.before_app_request
16 def inject_header_item(): # makes a submodule accessible.
19 @frontend.route("/captcha_response/<nonce>", methods
=["POST"])
21 def captcha_response(nonce
):
22 solve_captcha(nonce
, request
.json
)