Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
3fa01be9
Commit
3fa01be9
authored
10 years ago
by
Kegan Dougal
Browse files
Options
Downloads
Patches
Plain Diff
formatting
parent
008515c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/config/captcha.py
+9
-5
9 additions, 5 deletions
synapse/config/captcha.py
with
9 additions
and
5 deletions
synapse/config/captcha.py
+
9
−
5
View file @
3fa01be9
...
...
@@ -14,13 +14,16 @@
from
._base
import
Config
class
CaptchaConfig
(
Config
):
def
__init__
(
self
,
args
):
super
(
CaptchaConfig
,
self
).
__init__
(
args
)
self
.
recaptcha_private_key
=
args
.
recaptcha_private_key
self
.
enable_registration_captcha
=
args
.
enable_registration_captcha
self
.
captcha_ip_origin_is_x_forwarded
=
args
.
captcha_ip_origin_is_x_forwarded
self
.
captcha_ip_origin_is_x_forwarded
=
(
args
.
captcha_ip_origin_is_x_forwarded
)
@classmethod
def
add_arguments
(
cls
,
parser
):
...
...
@@ -32,11 +35,12 @@ class CaptchaConfig(Config):
)
group
.
add_argument
(
"
--enable-registration-captcha
"
,
type
=
bool
,
default
=
False
,
help
=
"
Enables ReCaptcha checks when registering, preventing signup
"
+
"
unless a captcha is answered. Requires a valid ReCaptcha public/private key.
"
help
=
"
Enables ReCaptcha checks when registering, preventing signup
"
+
"
unless a captcha is answered. Requires a valid ReCaptcha
"
+
"
public/private key.
"
)
group
.
add_argument
(
"
--captcha_ip_origin_is_x_forwarded
"
,
type
=
bool
,
default
=
False
,
help
=
"
When checking captchas, use the X-Forwarded-For (XFF) header
as the client IP
"
+
"
and not the actual client IP.
"
help
=
"
When checking captchas, use the X-Forwarded-For (XFF) header
"
+
"
as the client IP
and not the actual client IP.
"
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment