resolved @Rugvip comments
Signed-off-by: Luka Siric <siric.luka@gmail.com>
This commit is contained in:
@@ -2,12 +2,6 @@ app:
|
||||
title: Backstage Example App
|
||||
baseUrl: http://localhost:3000
|
||||
googleAnalyticsTrackingId: # UA-000000-0
|
||||
# https:
|
||||
# certificate:
|
||||
# cert:
|
||||
# $file: '\path\to\the\certificate'
|
||||
# key:
|
||||
# $file: '\path\to\the\private-key'
|
||||
#datadogRum:
|
||||
# clientToken: '123456789'
|
||||
# applicationId: qwerty
|
||||
|
||||
Vendored
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface Config {
|
||||
app: {
|
||||
/**
|
||||
* Running the frontend app with https
|
||||
*/
|
||||
https?: {
|
||||
/**
|
||||
* Parent object containing certificate and the private key
|
||||
*/
|
||||
certificate?: {
|
||||
/**
|
||||
* Https Certificate private key. Use $file to load in a file
|
||||
* @visibility secret
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* Https Certificate. Use $file to load in a file
|
||||
* @visibility secret
|
||||
*/
|
||||
cert: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -64,12 +64,10 @@ export async function serveBundle(options: ServeOptions) {
|
||||
https:
|
||||
url.protocol === 'https:'
|
||||
? {
|
||||
cert: options.frontendConfig.getOptionalString(
|
||||
cert: options.backendConfig.getString(
|
||||
'app.https.certificate.cert',
|
||||
),
|
||||
key: options.backendConfig.getOptionalString(
|
||||
'app.https.certificate.key',
|
||||
),
|
||||
key: options.backendConfig.getString('app.https.certificate.key'),
|
||||
}
|
||||
: false,
|
||||
host,
|
||||
|
||||
@@ -32,7 +32,6 @@ export type ServeOptions = BundlingPathsOptions & {
|
||||
frontendConfig: Config;
|
||||
frontendAppConfigs: AppConfig[];
|
||||
backendConfig: Config;
|
||||
backendAppConfigs: AppConfig[];
|
||||
};
|
||||
|
||||
export type BuildOptions = BundlingPathsOptions & {
|
||||
|
||||
@@ -96,11 +96,7 @@ export async function loadCliConfig(options: Options) {
|
||||
});
|
||||
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
|
||||
|
||||
const backendAppConfigs = schema.process(appConfigs, {
|
||||
visibility: ['frontend', 'backend', 'secret'],
|
||||
withFilteredKeys: options.withFilteredKeys,
|
||||
withDeprecatedKeys: options.withDeprecatedKeys,
|
||||
});
|
||||
const backendAppConfigs = schema.process(appConfigs);
|
||||
const backendConfig = ConfigReader.fromConfigs(backendAppConfigs);
|
||||
|
||||
return {
|
||||
@@ -108,7 +104,6 @@ export async function loadCliConfig(options: Options) {
|
||||
appConfigs,
|
||||
frontendConfig,
|
||||
frontendAppConfigs,
|
||||
backendAppConfigs,
|
||||
backendConfig,
|
||||
};
|
||||
} catch (error) {
|
||||
|
||||
Vendored
-20
@@ -65,26 +65,6 @@ export interface Config {
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
/**
|
||||
* Running the frontend app with https
|
||||
*/
|
||||
https?: {
|
||||
/**
|
||||
* Parent object containing certificate and the private key
|
||||
*/
|
||||
certificate?: {
|
||||
/**
|
||||
* Https Certificate private key. Use $file to load in a file
|
||||
* @visibility secret
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
* Https Certificate. Use $file to load in a file
|
||||
* @visibility frontend
|
||||
*/
|
||||
cert?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user