Merge pull request #16230 from backstage/blam/bs/new
Switch out `'plain'` in `HttpServerCertificateOptions`
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Updated to work with the new `type: 'pem'` with `createHttpServer` from `@backstage/backend-app-api`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-app-api': minor
|
||||
---
|
||||
|
||||
**BREAKING** `HttpServerCertificateOptions` when specified with a `key` and `cert` should also have the `type: 'pem'` instead of `type: 'plain'`
|
||||
@@ -133,7 +133,7 @@ export const httpRouterServiceFactory: (
|
||||
// @public
|
||||
export type HttpServerCertificateOptions =
|
||||
| {
|
||||
type: 'plain';
|
||||
type: 'pem';
|
||||
key: string;
|
||||
cert: string;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ describe('readHttpServerOptions', () => {
|
||||
{
|
||||
listen: { host: '', port: 7007 },
|
||||
https: {
|
||||
certificate: { type: 'plain', cert: 'my-cert', key: 'my-key' },
|
||||
certificate: { type: 'pem', cert: 'my-cert', key: 'my-key' },
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -93,7 +93,7 @@ function readHttpsOptions(config?: Config): HttpServerOptions['https'] {
|
||||
|
||||
return {
|
||||
certificate: {
|
||||
type: 'plain',
|
||||
type: 'pem',
|
||||
cert: cc.getString('certificate.cert'),
|
||||
key: cc.getString('certificate.key'),
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@ export type HttpServerOptions = {
|
||||
*/
|
||||
export type HttpServerCertificateOptions =
|
||||
| {
|
||||
type: 'plain';
|
||||
type: 'pem';
|
||||
key: string;
|
||||
cert: string;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export class ServiceBuilderImpl implements ServiceBuilder {
|
||||
this.serverOptions.https = {
|
||||
certificate: {
|
||||
...settings.certificate,
|
||||
type: 'plain',
|
||||
type: 'pem',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user