passing https.cert and https.key options to the webpack dev server
Signed-off-by: Luka Siric <siric.luka@gmail.com>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
Added support for custom certificate for webpack dev server.
|
||||
+6
-1
@@ -2,12 +2,17 @@ app:
|
||||
title: Backstage Example App
|
||||
baseUrl: http://localhost:3000
|
||||
googleAnalyticsTrackingId: # UA-000000-0
|
||||
# https:
|
||||
# credentials:
|
||||
# cert:
|
||||
# $file '\path\to\the\certificate'
|
||||
# key:
|
||||
# $file '\path\to\the\private-key'
|
||||
#datadogRum:
|
||||
# clientToken: '123456789'
|
||||
# applicationId: qwerty
|
||||
# site: # datadoghq.eu default = datadoghq.com
|
||||
# env: # optional
|
||||
|
||||
support:
|
||||
url: https://github.com/backstage/backstage/issues # Used by common ErrorPage
|
||||
items: # Used by common SupportButton component
|
||||
|
||||
@@ -60,7 +60,17 @@ export async function serveBundle(options: ServeOptions) {
|
||||
// See https://github.com/facebookincubator/create-react-app/issues/387.
|
||||
disableDotRule: true,
|
||||
},
|
||||
https: url.protocol === 'https:',
|
||||
https:
|
||||
url.protocol === 'https:'
|
||||
? {
|
||||
cert: options.frontendConfig.getOptionalString(
|
||||
'app.https.credentials.cert',
|
||||
),
|
||||
key: options.frontendConfig.getOptionalString(
|
||||
'app.https.credentials.key',
|
||||
),
|
||||
}
|
||||
: false,
|
||||
host,
|
||||
port,
|
||||
proxy: pkg.proxy,
|
||||
|
||||
Vendored
+20
@@ -65,6 +65,26 @@ export interface Config {
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
/**
|
||||
* Running the frontend app with https
|
||||
*/
|
||||
https?: {
|
||||
/**
|
||||
* Parent object containing certificate and the private key
|
||||
*/
|
||||
credentials?: {
|
||||
/**
|
||||
* Https Certificate private key. Can be loaded using $file
|
||||
* @visibility frontend
|
||||
*/
|
||||
key?: string;
|
||||
/**
|
||||
* Https Certificate. Can be loaded using $file
|
||||
* @visibility frontend
|
||||
*/
|
||||
cert?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user