mirror of
https://github.com/bitwarden/server.git
synced 2025-07-06 18:42:49 -05:00
adjust web appsettings overrides
This commit is contained in:
@ -5,32 +5,16 @@ namespace Bit.Setup
|
||||
{
|
||||
public class AppSettingsBuilder
|
||||
{
|
||||
public AppSettingsBuilder(string url, string domain)
|
||||
{
|
||||
Url = url;
|
||||
Domain = domain;
|
||||
}
|
||||
|
||||
public string Url { get; private set; }
|
||||
public string Domain { get; private set; }
|
||||
|
||||
public void Build()
|
||||
{
|
||||
Console.WriteLine("Building app settings.");
|
||||
Directory.CreateDirectory("/bitwarden/web/");
|
||||
using(var sw = File.CreateText("/bitwarden/web/settings.js"))
|
||||
{
|
||||
sw.Write($@"// Config Parameters
|
||||
// Parameter:Url={Url}
|
||||
// Parameter:Domain={Domain}
|
||||
|
||||
var bitwardenAppSettings = {{
|
||||
apiUri: ""{Url}/api"",
|
||||
identityUri: ""{Url}/identity"",
|
||||
iconsUri: ""{Url}/icons"",
|
||||
sw.Write($@"var bitwardenAppSettings = {{
|
||||
iconsUri: ""/icons"",
|
||||
stripeKey: null,
|
||||
braintreeKey: null,
|
||||
whitelistDomains: [""{Domain}""],
|
||||
selfHosted: true
|
||||
}};");
|
||||
}
|
||||
|
Reference in New Issue
Block a user