r/bitwarden_rs: Redirect to canonical host name
Bitwarden has not worked correctly for clients using the non-canonical domain name (i.e. _bitwarden.pyrocufflink.blue_) for quite some time. This still trips me up occasionally, though, so hopefully adding a server-side redirect will help. Eventually, I'll probably remove the non-canonical name entirely.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
bitwarden_domain: https://bitwarden.pyrocufflink.net
|
bitwarden_host: bitwarden.pyrocufflink.net
|
||||||
burp_backup_script_pre: /etc/burp/backup-pre.sh
|
burp_backup_script_pre: /etc/burp/backup-pre.sh
|
||||||
burp_backup:
|
burp_backup:
|
||||||
- include: /var/lib/vaultwarden/data
|
- include: /var/lib/vaultwarden/data
|
||||||
|
|||||||
1
roles/bitwarden_rs/defaults/main.yml
Normal file
1
roles/bitwarden_rs/defaults/main.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bitwarden_domain: https://{{ bitwarden_host }}
|
||||||
@@ -16,6 +16,10 @@ Header always set \
|
|||||||
Strict-Transport-Security "max-age=63072000; includeSubDomains"
|
Strict-Transport-Security "max-age=63072000; includeSubDomains"
|
||||||
|
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
{% if bitwarden_host is defined %}
|
||||||
|
RewriteCond %{SERVER_NAME} !{{ bitwarden_host }}
|
||||||
|
RewriteRule /.* https://{{ bitwarden_host }}$0
|
||||||
|
{% endif %}
|
||||||
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
||||||
RewriteRule /notifications/hub(.*) ws://localhost:3012/$1 [QSA,P,L]
|
RewriteRule /notifications/hub(.*) ws://localhost:3012/$1 [QSA,P,L]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user