1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-25 12:43:36 +00:00

Set urls from config file (#1151)

* Set environment URLs in webpack config.

* Provide non NULL dev server

* QA env uses the pq TLD

* Include icons in qa env

* Move base configs to develop.

local configurations should be done in the `./config/local.json` file.

* Fix config override loading to default to development

* Standardize url formatting

* Limit QA settings to those set in production

* Set self hosted in a config

* Specify cloud instead of production

Self hosted and cloud are both production environments.
The ENV setting is used to specify the env type while
NODE_ENV specifies whether development error handling and services.

* Update config instructions

* Remove invalid json

* Change env `production` references to `cloud`

* Fix formatting
This commit is contained in:
Matt Gibson
2021-08-25 14:15:31 -04:00
committed by GitHub
parent 2cbe023a38
commit 66bd8be2c9
16 changed files with 75 additions and 71 deletions

View File

@@ -47,7 +47,7 @@ export class AddCreditComponent implements OnInit {
constructor(private userService: UserService, private apiService: ApiService,
private platformUtilsService: PlatformUtilsService) {
if (process.env.ENV !== 'production' || platformUtilsService.isDev()) {
if (process.env.ENV !== 'cloud' || platformUtilsService.isDev()) {
this.ppButtonFormAction = WebConstants.paypal.buttonActionSandbox;
this.ppButtonBusinessId = WebConstants.paypal.businessIdSandbox;
}

View File

@@ -67,7 +67,7 @@ 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(process.env.ENV === 'production' && !platformUtilsService.isDev() ?
this.stripe = (window as any).Stripe(process.env.ENV === 'cloud' && !platformUtilsService.isDev() ?
WebConstants.stripeLiveKey : WebConstants.stripeTestKey);
this.stripeElements = this.stripe.elements();
this.setStripeElement();
@@ -126,7 +126,7 @@ export class PaymentComponent implements OnInit {
if (this.method === PaymentMethodType.PayPal) {
window.setTimeout(() => {
(window as any).braintree.dropin.create({
authorization: process.env.ENV === 'production' ?
authorization: process.env.ENV === 'cloud' ?
WebConstants.btProductionKey : WebConstants.btSandboxKey,
container: '#bt-dropin-container',
paymentOptionPriority: ['paypal'],