@backstage/plugin-proxy-backend 0.4.0-next.3 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/alpha/package.json +1 -1
- package/config.d.ts +49 -0
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# @backstage/plugin-proxy-backend
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @backstage/backend-plugin-api@0.6.4
|
|
9
|
+
- @backstage/backend-common@0.19.6
|
|
10
|
+
|
|
11
|
+
## 0.4.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 71114ac50e02: **BREAKING**: The export for the new backend system has been moved to be the `default` export.
|
|
16
|
+
|
|
17
|
+
For example, if you are currently importing the plugin using the following pattern:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { examplePlugin } from '@backstage/plugin-example-backend';
|
|
21
|
+
|
|
22
|
+
backend.add(examplePlugin);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
It should be migrated to this:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
backend.add(import('@backstage/plugin-example-backend'));
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 02ba0a2efd2a: Add the route name to an error message that appears when the backend
|
|
34
|
+
proxy wasn't well configured. This will help users to understand the
|
|
35
|
+
issue and fix the right configuration.
|
|
36
|
+
- 03691f0f3270: Add back the legacy proxy config, to get secret redaction
|
|
37
|
+
- Updated dependencies
|
|
38
|
+
- @backstage/backend-common@0.19.5
|
|
39
|
+
- @backstage/config@1.1.0
|
|
40
|
+
- @backstage/backend-plugin-api@0.6.3
|
|
41
|
+
|
|
3
42
|
## 0.4.0-next.3
|
|
4
43
|
|
|
5
44
|
### Minor Changes
|
package/alpha/package.json
CHANGED
package/config.d.ts
CHANGED
|
@@ -73,5 +73,54 @@ export interface Config {
|
|
|
73
73
|
allowedHeaders?: string[];
|
|
74
74
|
};
|
|
75
75
|
};
|
|
76
|
+
} & {
|
|
77
|
+
/**
|
|
78
|
+
* This was the legacy way of expressing proxies, and is now deprecated. We
|
|
79
|
+
* keep it around in the config schema, to ensure that legacy setups still
|
|
80
|
+
* have properly secret-marked values so that they get redacted.
|
|
81
|
+
*
|
|
82
|
+
* TODO(freben): Remove this in the future (suggestion: after 2024-03-01)
|
|
83
|
+
* when people likely have moved off of this format.
|
|
84
|
+
*/
|
|
85
|
+
[key: string]:
|
|
86
|
+
| string
|
|
87
|
+
| {
|
|
88
|
+
/**
|
|
89
|
+
* Target of the proxy. Url string to be parsed with the url module.
|
|
90
|
+
*/
|
|
91
|
+
target: string;
|
|
92
|
+
/**
|
|
93
|
+
* Object with extra headers to be added to target requests.
|
|
94
|
+
*/
|
|
95
|
+
headers?: {
|
|
96
|
+
/** @visibility secret */
|
|
97
|
+
Authorization?: string;
|
|
98
|
+
/** @visibility secret */
|
|
99
|
+
authorization?: string;
|
|
100
|
+
/** @visibility secret */
|
|
101
|
+
'X-Api-Key'?: string;
|
|
102
|
+
/** @visibility secret */
|
|
103
|
+
'x-api-key'?: string;
|
|
104
|
+
[key: string]: string | undefined;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Changes the origin of the host header to the target URL. Default: true.
|
|
108
|
+
*/
|
|
109
|
+
changeOrigin?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Rewrite target's url path. Object-keys will be used as RegExp to match paths.
|
|
112
|
+
* If pathRewrite is not specified, it is set to a single rewrite that removes the entire prefix and route.
|
|
113
|
+
*/
|
|
114
|
+
pathRewrite?: { [regexp: string]: string };
|
|
115
|
+
/**
|
|
116
|
+
* Limit the forwarded HTTP methods, for example allowedMethods: ['GET'] to enforce read-only access.
|
|
117
|
+
*/
|
|
118
|
+
allowedMethods?: string[];
|
|
119
|
+
/**
|
|
120
|
+
* Limit the forwarded HTTP methods. By default, only the headers that are considered safe for CORS
|
|
121
|
+
* and headers that are set by the proxy will be forwarded.
|
|
122
|
+
*/
|
|
123
|
+
allowedHeaders?: string[];
|
|
124
|
+
};
|
|
76
125
|
};
|
|
77
126
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-proxy-backend",
|
|
3
3
|
"description": "A Backstage backend plugin that helps you set up proxy endpoints in the backend",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"clean": "backstage-cli package clean"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@backstage/backend-common": "^0.19.
|
|
37
|
-
"@backstage/backend-plugin-api": "^0.6.
|
|
38
|
-
"@backstage/config": "^1.1.0
|
|
36
|
+
"@backstage/backend-common": "^0.19.6",
|
|
37
|
+
"@backstage/backend-plugin-api": "^0.6.4",
|
|
38
|
+
"@backstage/config": "^1.1.0",
|
|
39
39
|
"@types/express": "^4.17.6",
|
|
40
40
|
"express": "^4.17.1",
|
|
41
41
|
"express-promise-router": "^4.1.0",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"yup": "^0.32.9"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@backstage/backend-test-utils": "^0.2.
|
|
52
|
-
"@backstage/cli": "^0.22.13
|
|
53
|
-
"@backstage/config-loader": "^1.5.0
|
|
51
|
+
"@backstage/backend-test-utils": "^0.2.5",
|
|
52
|
+
"@backstage/cli": "^0.22.13",
|
|
53
|
+
"@backstage/config-loader": "^1.5.0",
|
|
54
54
|
"@types/http-proxy-middleware": "^0.19.3",
|
|
55
55
|
"@types/supertest": "^2.0.8",
|
|
56
56
|
"@types/uuid": "^8.0.0",
|