@redhat-cloud-services/frontend-components-config 4.6.6 → 4.6.7

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/README.md CHANGED
@@ -7,22 +7,36 @@
7
7
  - [Removed features with webpack 5](#removed-features-with-webpack-5)
8
8
  - [useProxy](#useproxy)
9
9
  - [Attributes](#attributes)
10
- - [useChromeTemplate](#useChromeTemplate)
10
+ - [useChromeTemplate](#usechrometemplate)
11
11
  - [localChrome](#localchrome)
12
- - [registry](#registry)
12
+ - [keycloakUri](#keycloakuri)
13
+ - [Registry](#registry)
13
14
  - [Custom routes](#custom-routes)
14
15
  - [routes](#routes)
15
16
  - [routesPath](#routespath)
16
- - [Custom proxy settings](#custom-proxy-settings)
17
+ - [Custom proxy settings](#custom-proxy-settings)
18
+ - [Env](#env)
19
+ - [Use cloud](#use-cloud)
20
+ - [Target](#target)
21
+ - [useAgent](#useagent)
22
+ - [bounceProd](#bounceprod)
23
+ - [Running PROD proxy without VPN](#running-prod-proxy-without-vpn)
17
24
  - [standalone](#standalone)
18
25
  - [Usage](#usage)
19
26
  - [Simple](#simple)
20
27
  - [Advanced](#advanced)
21
- - [Using provided services](#Using-provided-services)
22
- - [Writing services](#Writing-services)
23
- - [Customizing default services](#Customizing-default-services)
24
- - [fec node scripts](#fec-node-scripts)
25
- - [include PF css modules in your bundle](#include-PF-css-modules-in-your-bundle)
28
+ - [Using provided services](#using-provided-services)
29
+ - [Writing services](#writing-services)
30
+ - [Customizing default services](#customizing-default-services)
31
+ - [fec node scripts](#fec-node-scripts)
32
+ - [Usage](#usage-1)
33
+ - [Patch etc hosts](#patch-etc-hosts)
34
+ - [Static](#static)
35
+ - [Inventory example](#inventory-example)
36
+ - [In inventory UI repository changes](#in-inventory-ui-repository-changes)
37
+ - [Compliance frontend setup](#compliance-frontend-setup)
38
+ - [Run servers](#run-servers)
39
+ - [include PF css modules in your bundle](#include-pf-css-modules-in-your-bundle)
26
40
 
27
41
  ## Webpack 5
28
42
 
@@ -65,6 +79,8 @@ const { config: webpackConfig, plugins } = config({
65
79
  |[env](#env)|`string`|Environment to proxy against such as ci-beta.|
66
80
  |[useCloud](#use-cloud)|`boolean`|Toggle to use old fallback to cloud.redhat.com paths instead of console.redhat.com.|
67
81
  |[target](#target)|`string`|Override `env` and `useCloud` to use a custom URI.|
82
+ |[useAgent](#useAgent)|`boolean` = `true`|Enforce using the agent to proxy requests via `proxyUrl`.|
83
+ |[bounceProd](#bounceProd)|`boolean` = `false`|Bounce all non-GET requests via server requests.|
68
84
 
69
85
 
70
86
  #### useChromeTemplate
@@ -207,6 +223,33 @@ If you want to run in legacy mode pass `useCloud: true` in your config, this way
207
223
  #### Target
208
224
  Override for the target `env` and `useCloud` build. Useful for cross-environment testing.
209
225
 
226
+ #### useAgent
227
+
228
+ `boolean` = `true`
229
+
230
+ Enforces using the agent to proxy requests via `proxyUrl`. Setting this to `true` will enforce using agent for PROD environemnt too (use when you are using Red Hat VPN and you do not want to bounce PROD requests). STAGE is using the agent automatically and it cannot be turned off.
231
+
232
+ #### bounceProd
233
+
234
+ `boolean` = `false`
235
+
236
+ Bounce all non-GET PROD requests via server. This option removes all headers except `cookie` and `body` so Akamai won't have issues with different origins/hosts. This behavior allows to access PROD environment without using Red Hat VPN.
237
+
238
+ ##### Running PROD proxy without VPN
239
+
240
+ Set following attributes in your dev webpack proxy:
241
+
242
+ ```jsx
243
+ const config = {
244
+ ...options,
245
+ env: 'prod-stable', // or 'prod-beta'
246
+ useAgent: false,
247
+ bounceProd: true
248
+ }
249
+ ```
250
+
251
+ Now, you can access PROD env without being connected to Red Hat VPN.
252
+
210
253
  ## standalone
211
254
  A way to run cloud.redhat.com apps from `localhost` offline.
212
255
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redhat-cloud-services/frontend-components-config",
3
- "version": "4.6.6",
3
+ "version": "4.6.7",
4
4
  "description": "Config plugins and settings for RedHat Cloud Services project.",
5
5
  "main": "index.js",
6
6
  "bin": {
package/src/config.js CHANGED
@@ -36,6 +36,8 @@ module.exports = ({
36
36
  client = {},
37
37
  bundlePfModules = false,
38
38
  useChromeTemplate = false,
39
+ bounceProd,
40
+ useAgent,
39
41
  } = {}) => {
40
42
  const filenameMask = `js/[name]${useFileHash ? `.${Date.now()}.[fullhash]` : ''}.js`;
41
43
  if (betaEnv) {
@@ -197,6 +199,8 @@ module.exports = ({
197
199
  copyTemplate(chromePath);
198
200
  }
199
201
  },
202
+ bounceProd,
203
+ useAgent,
200
204
  }),
201
205
  },
202
206
  };