1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

FIDO U2F facet fiel headers

This commit is contained in:
Kyle Spearrin
2017-08-08 12:29:59 -04:00
parent 0a12006d32
commit e70323b59e
2 changed files with 35 additions and 0 deletions

View File

@ -145,6 +145,13 @@ server {{
proxy_redirect off;
}}
location = /app-id.json {{
proxy_pass http://web/app-id.json;
proxy_hide_header Content-Type;
add_header Content-Type $fido_content_type;
proxy_redirect off;
}}
location /api/ {{
proxy_pass http://api/;
proxy_set_header X-Real-IP $remote_addr;
@ -209,6 +216,29 @@ SA_PASSWORD={dbPass}");
}
}
private static void BuildAppId()
{
Directory.CreateDirectory("/bitwarden/web/");
using(var sw = File.CreateText("/bitwarden/web/app-id.json"))
{
sw.Write($@"{{
""trustedFacets"": [
{{
""version"": {{
""major"": 1,
""minor"": 0
}},
""ids"": [
""{_url}"",
""ios:bundle-id:com.8bit.bitwarden"",
""android:apk-key-hash:dUGFzUzf3lmHSLBDBIv+WaFyZMI""
]
}}
]
}}");
}
}
private static IDictionary<string, string> ParseParameters()
{
var dict = new Dictionary<string, string>();