mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00
Add captcha option to Nginx config (#1509)
* Add captcha option to Nginx config * Fix formatting
This commit is contained in:
parent
824645250e
commit
6d18f44029
@ -37,6 +37,9 @@ namespace Bit.Setup
|
||||
"Learn more: https://docs.docker.com/compose/compose-file/compose-versioning/")]
|
||||
public string ComposeVersion { get; set; }
|
||||
|
||||
[Description("Configure Nginx for Captcha.")]
|
||||
public bool Captcha { get; set; } = false;
|
||||
|
||||
[Description("Configure Nginx for SSL.")]
|
||||
public bool Ssl { get; set; } = true;
|
||||
|
||||
|
@ -68,6 +68,7 @@ namespace Bit.Setup
|
||||
|
||||
public TemplateModel(Context context)
|
||||
{
|
||||
Captcha = context.Config.Captcha;
|
||||
Ssl = context.Config.Ssl;
|
||||
Domain = context.Config.Domain;
|
||||
Url = context.Config.Url;
|
||||
@ -114,6 +115,7 @@ namespace Bit.Setup
|
||||
}
|
||||
}
|
||||
|
||||
public bool Captcha { get; set; }
|
||||
public bool Ssl { get; set; }
|
||||
public string Domain { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
@ -114,6 +114,16 @@ server {
|
||||
proxy_pass http://web:5000/sso-connector.html;
|
||||
}
|
||||
|
||||
{{#if Captcha}}
|
||||
location = /captcha-connector.html {
|
||||
proxy_pass http://web:5000/captcha-connector.html;
|
||||
}
|
||||
|
||||
location = /captcha-mobile-connector.html {
|
||||
proxy_pass http://web:5000/captcha-mobile-connector.html;
|
||||
}
|
||||
{{/if}}
|
||||
|
||||
location /attachments/ {
|
||||
proxy_pass http://attachments:5000/;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user