{"id":18884,"library":"ui5-middleware-http-proxy","title":"UI5 Middleware HTTP Proxy","description":"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.","status":"active","version":"2.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/werwolf2303/ui5-middleware-http-proxy","tags":["javascript","ui5","middleware","http","request","proxy","openui5","tooling"],"install":[{"cmd":"npm install ui5-middleware-http-proxy","lang":"bash","label":"npm"},{"cmd":"yarn add ui5-middleware-http-proxy","lang":"bash","label":"yarn"},{"cmd":"pnpm add ui5-middleware-http-proxy","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Logger interface for debug output","package":"@ui5/logger","optional":false},{"reason":"HTTP client for proxying requests","package":"request","optional":false},{"reason":"Resolves environment variables from .env files","package":"dotenv","optional":true}],"imports":[],"quickstart":{"code":"npm install --save-dev ui5-middleware-http-proxy\n# Add to package.json:\n{\n  \"ui5\": {\n    \"dependencies\": [\"ui5-middleware-http-proxy\"]\n  }\n}\n# Add to ui5.yaml:\nserver:\n  customMiddleware:\n    - name: ui5-middleware-http-proxy\n      mountPath: /myapi\n      afterMiddleware: compression\n      configuration:\n        baseUrl: https://api.example.com\n        path: /v1\n        debug: true\n        secure: false\n        auth:\n          user: env:API_USER\n          pass: env:API_PASS","lang":"yaml","description":"Install, register in package.json, and configure middleware in ui5.yaml with basic auth and debug enabled."},"warnings":[{"fix":"Monitor repository for updates that replace request with a modern HTTP client.","message":"The 'request' library used internally is deprecated and will stop receiving security fixes. Consider migrating to a native fetch or http-proxy.","severity":"deprecated","affected_versions":"<=2.1.0"},{"fix":"Prefix your auth values with 'env:' to use environment variables, e.g., `user: env:MY_USER`.","message":"Dotenv support only resolves variables prefixed with 'env:'. Direct values are not automatically expanded.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Explicitly set `secure: false` in the configuration if you need to accept self-signed certificates.","message":"Configuration option 'secure' defaults to true, rejecting self-signed certificates. This may cause unexpected failures when proxying to servers with self-signed certs.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure that `mountPath` and `configuration.path` are consistent; typically both set to the same value (e.g., '/resources').","message":"Mount path and configuration path must match because the middleware rewrites the request URL by removing the mountPath and prepending the configured path.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run npm install --save-dev ui5-middleware-http-proxy and add \"ui5\": { \"dependencies\": [\"ui5-middleware-http-proxy\"] } to your package.json.","cause":"The package is not installed or not declared as a UI5 dependency in package.json.","error":"Error: Cannot find module 'ui5-middleware-http-proxy'"},{"fix":"Add `afterMiddleware: compression` (or another valid middleware) to each custom middleware entry.","cause":"The 'afterMiddleware' property is missing or misspelled in ui5.yaml custom middleware configuration.","error":"UI5 server fails with 'afterMiddleware' not defined"},{"fix":"Verify the target service is running and the baseUrl/port is correct. Use `debug: true` to see the proxied URL.","cause":"The baseUrl is pointing to a service that is not running or the port is incorrect.","error":"ECONNREFUSED when proxying to localhost"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}