Skip to content

Commit c6de540

Browse files
committed
[IMP] fastapi_captcha: Handle custom altcha url
1 parent f36921c commit c6de540

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

fastapi_captcha/README.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Fastapi Captcha
3131
This module provides a simple way to protect several fastapi endpoints
3232
routes with a captcha.
3333

34-
It curreently supports the following captcha providers:
34+
It currently supports the following captcha providers:
3535

3636
- `Google reCAPTCHA <https://www.google.com/recaptcha>`__
3737
- `hCaptcha <https://www.hcaptcha.com/>`__
@@ -49,6 +49,9 @@ Check the ``Use Captcha`` checkbox in your FastAPI endpoint to enable
4949
captcha validation, then enter your captcha provider, secret key and an
5050
array of route url regex.
5151

52+
Every matching route will now require a valid captcha token in the
53+
X-Captcha-Token header.
54+
5255
Bug Tracker
5356
===========
5457

fastapi_captcha/readme/DESCRIPTION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This module provides a simple way to protect several fastapi endpoints routes with a
22
captcha.
33

4-
It curreently supports the following captcha providers:
4+
It currently supports the following captcha providers:
55

66
- [Google reCAPTCHA](https://www.google.com/recaptcha)
77
- [hCaptcha](https://www.hcaptcha.com/)

fastapi_captcha/readme/USAGE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
Check the `Use Captcha` checkbox in your FastAPI endpoint to enable captcha validation,
22
then enter your captcha provider, secret key and an array of route url regex.
3+
4+
Every matching route will now require a valid captcha token in the X-Captcha-Token
5+
header.

fastapi_captcha/static/description/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ <h1 class="title">Fastapi Captcha</h1>
372372
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/rest-framework/tree/16.0/fastapi_captcha"><img alt="OCA/rest-framework" src="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/rest-framework-16-0/rest-framework-16-0-fastapi_captcha"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module provides a simple way to protect several fastapi endpoints
374374
routes with a captcha.</p>
375-
<p>It curreently supports the following captcha providers:</p>
375+
<p>It currently supports the following captcha providers:</p>
376376
<ul class="simple">
377377
<li><a class="reference external" href="https://www.google.com/recaptcha">Google reCAPTCHA</a></li>
378378
<li><a class="reference external" href="https://www.hcaptcha.com/">hCaptcha</a></li>
@@ -396,6 +396,8 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
396396
<p>Check the <tt class="docutils literal">Use Captcha</tt> checkbox in your FastAPI endpoint to enable
397397
captcha validation, then enter your captcha provider, secret key and an
398398
array of route url regex.</p>
399+
<p>Every matching route will now require a valid captcha token in the
400+
X-Captcha-Token header.</p>
399401
</div>
400402
<div class="section" id="bug-tracker">
401403
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>

0 commit comments

Comments
 (0)