mirror of
https://github.com/bitwarden/server
synced 2025-12-06 00:03:34 +00:00
Add env variable to override /installations domain (#5669)
* Add env variable to override /installations domain
This commit is contained in:
@@ -278,6 +278,13 @@ public class Program
|
|||||||
url = "https://api.bitwarden.com/installations/";
|
url = "https://api.bitwarden.com/installations/";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string installationUrl = Environment.GetEnvironmentVariable("BW_INSTALLATION_URL");
|
||||||
|
if (!string.IsNullOrEmpty(installationUrl))
|
||||||
|
{
|
||||||
|
url = $"{installationUrl}/installations/";
|
||||||
|
}
|
||||||
|
|
||||||
var response = new HttpClient().GetAsync(url + _context.Install.InstallationId).GetAwaiter().GetResult();
|
var response = new HttpClient().GetAsync(url + _context.Install.InstallationId).GetAwaiter().GetResult();
|
||||||
|
|
||||||
if (!response.IsSuccessStatusCode)
|
if (!response.IsSuccessStatusCode)
|
||||||
|
|||||||
Reference in New Issue
Block a user