From cf7274aa4697bca9a58c1369e2facab4a02431ae Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 20 Dec 2017 22:48:51 -0500 Subject: [PATCH] adjust web appsettings overrides --- util/Setup/AppSettingsBuilder.cs | 20 ++------------------ util/Setup/Program.cs | 4 ++-- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/util/Setup/AppSettingsBuilder.cs b/util/Setup/AppSettingsBuilder.cs index 6497d8e12f..aff150291a 100644 --- a/util/Setup/AppSettingsBuilder.cs +++ b/util/Setup/AppSettingsBuilder.cs @@ -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 }};"); } diff --git a/util/Setup/Program.cs b/util/Setup/Program.cs index e93684822e..961abe32d3 100644 --- a/util/Setup/Program.cs +++ b/util/Setup/Program.cs @@ -187,7 +187,7 @@ namespace Bit.Setup }; environmentFileBuilder.BuildForInstaller(); - var appSettingsBuilder = new AppSettingsBuilder(url, domain); + var appSettingsBuilder = new AppSettingsBuilder(); appSettingsBuilder.Build(); var appIdBuilder = new AppIdBuilder(url); @@ -333,7 +333,7 @@ namespace Bit.Setup var nginxBuilder = new NginxConfigBuilder(domain, url); nginxBuilder.BuildForUpdater(); - var appSettingsBuilder = new AppSettingsBuilder(url, domain); + var appSettingsBuilder = new AppSettingsBuilder(); appSettingsBuilder.Build(); var appIdBuilder = new AppIdBuilder(url);