feat: make it work
This commit is contained in:
@@ -19,13 +19,14 @@
|
||||
"dependencies": {
|
||||
"@backstage/cli": "^0.1.1-alpha.4",
|
||||
"@backstage/core": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-explore": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-circleci": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-explore": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-home-page": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-inventory": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-lighthouse": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-scaffolder": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-tech-radar": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-test": "^0.1.1-alpha.4",
|
||||
"@backstage/plugin-welcome": "^0.1.1-alpha.4",
|
||||
"@backstage/theme": "^0.1.1-alpha.4",
|
||||
"@material-ui/core": "^4.9.1",
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
const { proxySettings } = require('@backstage/plugin-circleci');
|
||||
const { createProxyMiddleware } = require('http-proxy-middleware');
|
||||
const createProxyMiddleware = require('http-proxy-middleware');
|
||||
|
||||
// FIXME: somehow get it from within the plugin itself?
|
||||
const circleCIProxySettings = {
|
||||
'/circleci/api': {
|
||||
target: 'https://circleci.com/api/v1.1',
|
||||
changeOrigin: true,
|
||||
logLevel: 'debug',
|
||||
pathRewrite: {
|
||||
'^/circleci/api/': '/',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = (/** @type {import('express').Application} */ app) =>
|
||||
Object.entries(proxySettings).forEach(([url, settings]) =>
|
||||
Object.entries(circleCIProxySettings).forEach(([url, settings]) =>
|
||||
app.use(url, createProxyMiddleware(settings)),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user