mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
Set baseUrl in QA cloud environment (#994)
* Set baseUrl if not deployed to prod server * Add env variable TARGET and use to set baseUrl * remove webPlatformUtilsService.isProdServer * passing the ENV through to the Angular app * switching the value of SELF_HOST back to true * fixing some webpack.config variables * fixing the selfhost angular process.env * removing unecessary code Co-authored-by: Joseph Flinn <joseph.s.flinn@gmail.com>
This commit is contained in:
@@ -144,9 +144,8 @@ containerService.attachToWindow(window);
|
||||
export function initFactory(): Function {
|
||||
return async () => {
|
||||
await (storageService as HtmlStorageService).init();
|
||||
const isDev = platformUtilsService.isDev();
|
||||
|
||||
if (isDev || platformUtilsService.isSelfHost()) {
|
||||
if (process.env.ENV !== 'production') {
|
||||
environmentService.baseUrl = window.location.origin;
|
||||
} else {
|
||||
environmentService.notificationsUrl = 'https://notifications.bitwarden.com';
|
||||
|
||||
@@ -67,8 +67,8 @@ export class PaymentComponent implements OnInit {
|
||||
this.stripeScript.src = 'https://js.stripe.com/v3/';
|
||||
this.stripeScript.async = true;
|
||||
this.stripeScript.onload = () => {
|
||||
this.stripe = (window as any).Stripe(this.platformUtilsService.isDev() ?
|
||||
WebConstants.stripeTestKey : WebConstants.stripeLiveKey);
|
||||
this.stripe = (window as any).Stripe(process.env.ENV === 'production' ?
|
||||
WebConstants.stripeLiveKey : WebConstants.stripeTestKey);
|
||||
this.stripeElements = this.stripe.elements();
|
||||
this.setStripeElement();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user