1
0
mirror of https://github.com/bitwarden/server synced 2026-01-21 03:43:53 +00:00

domain mapping service and more cleanup

This commit is contained in:
Kyle Spearrin
2017-10-09 14:21:20 -04:00
parent fc3425dfb7
commit 4d7bd85490
6 changed files with 46 additions and 11 deletions

View File

@@ -0,0 +1,24 @@
using System.Collections.Generic;
namespace Bit.Icons.Services
{
public class DomainMappingService : IDomainMappingService
{
private readonly Dictionary<string, string> _map = new Dictionary<string, string>
{
["vault.bitwarden.com"] = "bitwarden.com",
["accounts.google.com"] = "google.com",
// TODO: Add others here
};
public string MapDomain(string hostname)
{
if(_map.ContainsKey(hostname))
{
return _map[hostname];
}
return hostname;
}
}
}