Merge branch 'icons' of https://github.com/jjlin/vaultwarden into jjlin-icons

This commit is contained in:
Daniel García
2022-01-23 23:43:24 +01:00
3 changed files with 13 additions and 9 deletions

View File

@@ -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