Registry / web-framework / ui5-middleware-http-proxy

ui5-middleware-http-proxy

JSON →
library2.1.0jsnpmunverified

Custom UI5 tooling middleware extension for proxying HTTP requests to remote services during local development. Version 2.1.0 supports HTTP basic authentication, self-signed certificates, and debug logging. Released on npm, active maintenance. Key differentiators: simple YAML configuration, native integration with UI5 Tooling's middleware lifecycle, and optional .env file support via dotenv. Compared to generic proxies, it is tailored for UI5 projects and works seamlessly with openui5-sdk-docker.

npm install ui5-middleware-http-proxy
INSTALL
IMPORT
SIG · UI5-MIDDLEWARE-HTT
U
ui5-middleware-http-proxy
web-frameworkjavascriptv2.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Install, register in package.json, and configure middleware in ui5.yaml with basic auth and debug enabled.

npm install --save-dev ui5-middleware-http-proxy # Add to package.json: { "ui5": { "dependencies": ["ui5-middleware-http-proxy"] } } # Add to ui5.yaml: server: customMiddleware: - name: ui5-middleware-http-proxy mountPath: /myapi afterMiddleware: compression configuration: baseUrl: https://api.example.com path: /v1 debug: true secure: false auth: user: env:API_USER pass: env:API_PASS
Debug
Known issues
deprecatedThe 'request' library used internally is deprecated and will stop receiving security fixes. Consider migrating to a native fetch or http-proxy.
fix
Monitor repository for updates that replace request with a modern HTTP client.
affects: <=2.1.0
gotchaDotenv support only resolves variables prefixed with 'env:'. Direct values are not automatically expanded.
fix
Prefix your auth values with 'env:' to use environment variables, e.g., `user: env:MY_USER`.
affects: >=1.0.0
gotchaConfiguration option 'secure' defaults to true, rejecting self-signed certificates. This may cause unexpected failures when proxying to servers with self-signed certs.
fix
Explicitly set `secure: false` in the configuration if you need to accept self-signed certificates.
affects: >=1.0.0
gotchaMount path and configuration path must match because the middleware rewrites the request URL by removing the mountPath and prepending the configured path.
fix
Ensure that `mountPath` and `configuration.path` are consistent; typically both set to the same value (e.g., '/resources').
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'ui5-middleware-http-proxy'
The package is not installed or not declared as a UI5 dependency in package.json.
fix
Run npm install --save-dev ui5-middleware-http-proxy and add "ui5": { "dependencies": ["ui5-middleware-http-proxy"] } to your package.json.
UI5 server fails with 'afterMiddleware' not defined
The 'afterMiddleware' property is missing or misspelled in ui5.yaml custom middleware configuration.
fix
Add `afterMiddleware: compression` (or another valid middleware) to each custom middleware entry.
ECONNREFUSED when proxying to localhost
The baseUrl is pointing to a service that is not running or the port is incorrect.
fix
Verify the target service is running and the baseUrl/port is correct. Use `debug: true` to see the proxied URL.
Upgrade
Version history
2.1.0latest on npm
Audit
Dependencies
@ui5/loggerrequiredLogger interface for debug output
requestrequiredHTTP client for proxying requests
dotenvoptionalResolves environment variables from .env files
Agent activity
7 hits · last 30 days
node
6
OpenAI (training)
1
Resources
ui5-middleware-http-proxy — npm install ui5-middleware-http-proxy · libregistry