Registry /
http-networking / ui5-middleware-simpleproxy
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ui5-middleware-simpleproxy
✓ server:
customMiddleware:
- name: ui5-middleware-simpleproxy
✗ import { ui5MiddlewareSimpleproxy } from 'ui5-middleware-simpleproxy';
This package is a UI5 Tooling middleware and does not expose JavaScript exports for direct `import` or `require`. It is 'integrated' into your UI5 project by configuring its name under `server.customMiddleware` in your `ui5.yaml` file.
baseUri
✓ configuration:
baseUri: "https://services.odata.org"
✗ configuration:
uri: "https://services.odata.org"
The primary configuration option for specifying the target backend service URL is `baseUri`. Ensure it is correctly spelled within the `configuration` block. It can also be overridden by the `UI5_MIDDLEWARE_SIMPLE_PROXY_BASEURI` environment variable.
strictSSL
✓ configuration:
strictSSL: false
✗ configuration:
ignoreSSL: true
The `strictSSL` option controls whether the proxy validates SSL certificates of the target `baseUri`. Set to `false` to ignore self-signed or untrusted certificates. The default value is `true`. This can also be overridden by `UI5_MIDDLEWARE_SIMPLE_PROXY_STRICT_SSL` environment variable.
This quickstart illustrates the installation process and the typical `ui5.yaml` configuration for `ui5-middleware-simpleproxy`, demonstrating how to set up proxying to a backend service with authentication, custom headers, query parameters, and SSL handling.
// Step 1: Install the middleware as a development dependency.
// npm install ui5-middleware-simpleproxy --save-dev
// Step 2: Configure the middleware in your UI5 project's `ui5.yaml` file.
// This is an example of the YAML configuration required, shown here commented out
// as it is not direct JavaScript code but rather a configuration file entry.
/*
# ui5.yaml content:
server:
customMiddleware:
- name: ui5-middleware-simpleproxy
# The middleware will process requests that start with this path
mountPath: /odata
# Specify to run this middleware after the 'compression' middleware
afterMiddleware: compression
configuration:
# The target URI to proxy requests to
baseUri: "https://services.odata.org"
# Optional: Username for Basic Authentication
username: "myUsername"
# Optional: Password for Basic Authentication
password: "myPassword"
# Optional: Custom HTTP headers to be sent with the proxied request
httpHeaders:
Any-Header: AnyHeaderValue
# Optional: Query parameters to be appended to the proxied request
query:
sap-client: '206'
# Optional: Array of glob patterns for paths to exclude from proxying
excludePatterns:
- "/local/**"
# Optional: Enable WebSocket proxying (experimental, defaults to false)
enableWebSocket: false
# Optional: Set to 'false' to ignore strict SSL checks (default is true)
strictSSL: false
*/
// Note: Configuration values in ui5.yaml can be overridden by environment variables.
// Example using process.env (for demonstration, actual usage would be shell variables):
// process.env.UI5_MIDDLEWARE_SIMPLE_PROXY_BASEURI = 'https://some.other.backend.com/sap';
// process.env.UI5_MIDDLEWARE_SIMPLE_PROXY_STRICT_SSL = 'false';
// After configuration, run your UI5 application with `ui5 serve` to activate the proxy.
Errors
Common errors & fixes
Error: unable to verify the first certificate
The proxy is attempting to connect to an HTTPS `baseUri` that uses a self-signed or otherwise untrusted SSL certificate, and `strictSSL` is enabled (default behavior).
fixIn your `ui5.yaml` configuration, set `strictSSL: false` under the middleware's `configuration` block to disable certificate validation.
Custom middleware 'ui5-middleware-simpleproxy' not found
The `ui5-middleware-simpleproxy` package is either not installed in your project's `devDependencies`, or your `@ui5/cli` version is incompatible (e.g., using middleware v3 with `@ui5/cli` v2).
fixRun `npm install ui5-middleware-simpleproxy --save-dev` and verify that your `@ui5/cli` version meets the minimum requirement (e.g., `^3.0.0` for middleware v3).
Missing mandatory configuration parameter 'baseUri'
The `baseUri` property is a mandatory configuration option and was not provided in the `ui5.yaml` configuration for the middleware, nor via an environment variable.
fixAdd the `baseUri` property to the `configuration` section of `ui5-middleware-simpleproxy` in your `ui5.yaml` with the target backend URL: `configuration:\n baseUri: "https://your.backend.service"`.
Audit
Dependencies
@ui5/clirequiredThis package is a middleware for the UI5 Tooling. It requires `@ui5/cli` to be installed and available in the project's development environment to function correctly, specifically version `^3.0.0` for middleware major version 3.x.