mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-23 11:38:09 +03:00
Add support for legacy HTTP 301/302 redirects for external icons
At least on Android, it seems the Bitwarden mobile client responds to HTTP 307, but not to HTTP 308 for some reason.
This commit is contained in:
1 parent
8ba6e61fd5
commit
a16c656770
3 files changed
+13
-9
No files matched your search
+3
-1
@@ -72,8 +72,10 @@ fn icon_redirect(domain: &str, template: &str) -> Option<Redirect> {
|
||||
|
||||
let url = template.replace("{}", domain);
|
||||
match CONFIG.icon_redirect_code() {
|
||||
308 => Some(Redirect::permanent(url)),
|
||||
301 => Some(Redirect::moved(url)), // legacy permanent redirect
|
||||
302 => Some(Redirect::found(url)), // legacy temporary redirect
|
||||
307 => Some(Redirect::temporary(url)),
|
||||
308 => Some(Redirect::permanent(url)),
|
||||
_ => {
|
||||
error!("Unexpected redirect code {}", CONFIG.icon_redirect_code());
|
||||
None
|
||||
|
||||
Reference in new issue
Block a user