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:
24
src/Icons/Services/DomainMappingService.cs
Normal file
24
src/Icons/Services/DomainMappingService.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user