ui5-middleware-simpleproxy
A UI5 dev-server middleware that proxies requests from the local dev server to a backend system, so the app can reach the backend's services during development.
UI5 simple proxy middleware
Facts
Where it sits
Who is behind it
In the atlas: maintains 69@ui5-communitymaintainerAdrian BobevContributes to this
In the atlas: contributes to 10@adrian-bobevAttila BorosContributes to this
In the atlas: contributes to 6@attila-borosBenjamin ReimContributes to this
In the atlas: contributes to 9@BenReimChristian GeorgiContributes to this
In the atlas: maintains 1, contributes to 53@chgeoFrank WeigelContributes to this
In the atlas: contributes to 10@codeworriorDavid SooterContributes to this
In the atlas: contributes to 9@d-sooterYavor IvanovContributes to this
In the atlas: contributes to 17@d3xter666Austin DevineContributes to this
In the atlas: maintains 7, contributes to 25@devineaDimitar FenerskiContributes to this
In the atlas: contributes to 23@dfenerskiDominik FeiningerContributes to this
In the atlas: contributes to 11@dominikfeininger58 contributors
What it declares
Every artifact
- Type
- Build tool
- Origin
- By a community org
- Runtime
- Node.js
As a build tool
- Distributed through
- npm
Connections
Serving an app locally and building it for deployment
Download
Install
npm add ui5-middleware-simpleproxyDerived from the package name. No recipe recorded; the README has the configuration.
README
quoted from ui5-community/ui5-ecosystem-showcase under Apache-2.0, readUI5 simple proxy middleware
Middleware for ui5-server, enabling proxy support.
Prerequisites
- Requires at least
@ui5/cli@3.0.0(to supportspecVersion: "3.0")
⚠️ UI5 CLI Compatibility All releases of this UI5 CLI extension using the major version
3require UI5 CLI V3. Any previous releases below major version3(if available) also support older versions of the UI5 CLI. But the usage of the latest UI5 CLI is strongly recommended!
Install
npm install ui5-middleware-simpleproxy --save-dev
Configuration options (in $yourapp/ui5.yaml)
baseUri:stringThe baseUri to proxy. Can also be set using theUI5_MIDDLEWARE_SIMPLE_PROXY_BASEURIenvironment variable. To proxy WebSockets just use a WebSocket URL, e.g.ws://echo.websocket.org. Hint: themountPathof the middleware is not considered for the baseUri. It's just used as is!strictSSL:booleanIgnore strict SSL checks. Default valuetrue. Can also be set using theUI5_MIDDLEWARE_SIMPLE_PROXY_STRICT_SSLenvironment variable.removeETag:booleanRemoves the ETag header from the response to avoid conditional requests.username:stringUsername used for Basic Authentication.password:stringPassword used for Basic Authentication.httpHeaders:mapHttp headers set for the proxied request. Will overwrite the http headers from the request.query:mapQuery parameters set for the proxied request. Will overwrite the parameters from the request.excludePatterns:string[]Array of exclude patterns using glob syntaxexcludes:string[]Array of exclude patterns using glob syntax (alias ofexcludePatterns, aligned with theui5-task-zipperconvention). Requests matching any pattern are not proxied.includes:string[]Array of include patterns using glob syntax; when set, only requests matching at least one pattern are proxied.skipCache:booleanRemove the cache guid when serving from the FLP launchpad if it matches an excludePatternenableWebSocket:<boolean>, default:falseexperimental enables support for proxying web sockets
In general, use of environment variables or values set in a .env file will override configuration values in the ui5.yaml.
Usage
- Define the dependency in
$yourapp/package.json:
"devDependencies": {
// ...
"ui5-middleware-simpleproxy": "*"
// ...
}
- configure it in
$yourapp/ui5.yaml:
server:
customMiddleware:
- name: ui5-middleware-simpleproxy
afterMiddleware: compression
mountPath: /odata
configuration:
baseUri: "https://services.odata.org"
username: myUsername
password: myPassword
httpHeaders:
Any-Header: AnyHeader
query:
sap-client: '206'
excludePatterns:
- "/local/**"
How it works
The middleware launches a simple proxy-server which proxies the requests to the given uri. Internally, it uses the express proxy middleware.
How to ignore self-signed certificates?
In case you are using HTTPS and self-signed certificates, you may see an error as displayed below:
Error: unable to verify the first certificate
at TLSSocket.onConnectSecure (_tls_wrap.js:1321:34)
at TLSSocket.emit (events.js:210:5)
at TLSSocket._finishInit (_tls_wrap.js:794:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:608:12)
To avoid it, you can set the strictSSL value in proxy request to be false. Its default value is true.
server:
customMiddleware:
- name: ui5-middleware-simpleproxy
afterMiddleware: compression
mountPath: /odata
configuration:
baseUri: "http://services.odata.org"
strictSSL: false
.env support
This plugin supports use of a .env file to declare environment variable values for configuration as described above. The file should be put in the same directory where you run ui5 build, ui5 serve, etc. The file might have contents like:
UI5_MIDDLEWARE_SIMPLE_PROXY_BASEURI=https://host.tld:1234/sap
UI5_MIDDLEWARE_SIMPLE_PROXY_STRICT_SSL=false
UI5_MIDDLEWARE_SIMPLE_PROXY_USERNAME=myUsername
UI5_MIDDLEWARE_SIMPLE_PROXY_PASSWORD=myPassword
Hints
If you are using the Microsoft OData services for testing purposes, like Northwind for V2 or TripPin for V4, please ensure to use the https URLs instead of the http URLs. The http URL will redirect to https but instead of the proxy it will try to directly connect to the Microsoft OData services.
Another known issue is the the validation of the csrf-token fails for the $batch requests (e.g. in Chrome). To workaround this issue, also running the dev server in https can solve the issue.
UI5 CLI supports running the dev server in https by running the following command line option:
ui5 serve --h2
Note: With Node v24, usage of HTTP/2 is no longer supported in UI5 CLI. Please check https://github.com/UI5/cli/issues/327 for updates.
More details can be found in the documentation of the UI5 CLI for the ui5 serve command.
License
This work is licensed under Apache 2.0.
Built with care (and a lot of caffeine). If this helped you build, test, or ship, the next coffee — or drink — is on you when you bump into a contributor.
History
Features 1
Notes
Minor Changes
-
#1430
9aae380Thanks @petermuessig! - feat(ui5-middleware-simpleproxy): addincludes/excludesglob optionsAdds
excludes(a glob-syntax alias of the pre-existingexcludePatterns) and a newincludesoption, both matched viaminimatch, aligning the option naming withui5-task-zipper. Whenincludesis set, only matching request paths are proxied;excludes/excludePatternsstill take precedence. The behavior of the existingexcludePatternsoption is unchanged (it was already glob-based).
Features 1, Fixes 1
Notes
Minor Changes
- #1370
dd71c42Thanks @petermuessig! - Upgradehttp-proxy-middlewareto v4. v4 ships as ESM-only and requires Node >= 22.15.0 (already the CI baseline). The exposed API surface used here (target,changeOrigin,secure,agent,auth,headers,pathFilter,pathRewrite,selfHandleResponse,xfwd,autoRewrite,on.proxyReq/proxyRes,responseInterceptor,proxyMiddleware.upgrade) is unchanged; therequire()calls were switched to dynamicawait import()inside the existing async scopes — same pattern already used forproxy-from-envandhttps-proxy-agent.
Patch Changes
- #1370
dd71c42Thanks @petermuessig! - Bumpminimatchfrom v7 to v10. v9 dropped the default export, so the fiverequire("minimatch")sites were switched to the named exportconst { minimatch } = require("minimatch"). The runtime call shapeminimatch(path, pattern)is unchanged. minimatch 8 raised the Node floor to 20+, which already matches the workspace engines (Node 22 in CI).
All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
- #1370
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Breaking 52, Features 1, Other 2
Notes
chore
-
Added typedefs to onelogin and simpleproxy (#620) (5404971), closes #617 #606
-
Updated typedefs on simpleproxy (#621) (75e8610), closes #621 #617 #606
Features
BREAKING CHANGES
-
new package manager
-
refactor: updated tests to pass with pnpm
-
refactor: iasync still failing
-
feat(ui5-tooling-modules): support pnpm / node_modules symlinks
-
fix(ui5-app): make Karma work with pnpm
-
chore(ui5-app): remove uiveri5 from sample
-
chore(ui5-app): add updated wdio.conf
-
fix: make prettier and eslint work with pnpm
-
fix: fix cf_dest tests
restructured tests and added node_modules as symlink
-
fix(ui5-app): adding eslint for wdio and mocha
-
chore(ui5-middleware-cfdestination): cleanup
-
feat(ui5-tooling-modules): add bundling support for AMD
-
chore(ui5-tooling-modules): cleanup
-
new package manager
-
refactor: updated tests to pass with pnpm
-
refactor: iasync still failing
-
feat(ui5-tooling-modules): support pnpm / node_modules symlinks
-
fix(ui5-app): make Karma work with pnpm
-
chore(ui5-app): remove uiveri5 from sample
-
chore(ui5-app): add updated wdio.conf
-
fix: make prettier and eslint work with pnpm
-
fix: fix cf_dest tests
restructured tests and added node_modules as symlink
-
fix(ui5-app): adding eslint for wdio and mocha
-
chore(ui5-middleware-cfdestination): cleanup
-
feat(ui5-tooling-modules): add bundling support for AMD
-
chore(ui5-tooling-modules): cleanup
-
new package manager
-
refactor: updated tests to pass with pnpm
-
refactor: iasync still failing
-
feat(ui5-tooling-modules): support pnpm / node_modules symlinks
-
fix(ui5-app): make Karma work with pnpm
-
chore(ui5-app): remove uiveri5 from sample
-
chore(ui5-app): add updated wdio.conf
-
fix: make prettier and eslint work with pnpm
-
fix: fix cf_dest tests
restructured tests and added node_modules as symlink
-
fix(ui5-app): adding eslint for wdio and mocha
-
chore(ui5-middleware-cfdestination): cleanup
-
feat(ui5-tooling-modules): add bundling support for AMD
-
chore(ui5-tooling-modules): cleanup
-
chore: fix code style
-
fix(ui5-task-flatten-library): support files without extensions
-
refactor: updated tests to pass with pnpm
-
feat(ui5-tooling-modules): support pnpm / node_modules symlinks
-
fix: make prettier and eslint work with pnpm
-
fix: update actions, lerna, vscode for pnpm
-
chore: only run test on tooling extensions
-
chore: use sequential tests for ava
-
chore: add @ui5/cli dev dependency for ava tests
-
chore: enable support for local act GH action tests
-
chore: add docu for local GitHub action execution
-
chore: docu cleanup
-
chore: re-add ncu scripts
Co-authored-by: Peter Muessig peter.muessig@sap.com
-
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Notes
Note: Version bump only for package ui5-middleware-simpleproxy
Others providing
Compare all 42 on the Build and dev-server tooling page →- UI5 ToolsUI5 ToolsA VS Code extension for UI5 developers that serves, proxies, builds and deploys UI5 projects from one workspace-wide configuration, with live reload, a Gateway deployer and a BSP importer.independent, ui5VS Code extension to serve, proxy, build and deploy UI5 projects
- ui5-middleware-route-proxyui5-middleware-route-proxyA UI5 server middleware that forwards requests matching a route prefix to a backend host, configured per route in ui5.yaml, with credentials read from a .env file rather than the yaml.independent, ui5UI5 server middleware proxying route prefixes to a backend
- ui5-task-cachebuster-indexingui5-task-cachebuster-indexingA UI5 builder task that copies the build output into a timestamped folder inside dist so the UI5 cachebuster can resolve it; it supports timestamps only, not the hash mode.independent, ui5UI5 builder task preparing build output for the cachebuster
- ui5-task-transpile-genui5-task-transpile-genA UI5 builder task that transpiles ES6 to ES5, including async/await, with Babel at build time, registered in ui5.yaml with a bundle definition that includes the regenerator runtime.independent, ui5UI5 builder task transpiling ES6 to ES5 with Babel
- ui5-middleware-odata-recorderui5-middleware-odata-recorderA UI5 server middleware that records the OData traffic a running app makes against a real backend and writes entity JSON files and metadata.xml that the Fiori elements mock server can replay.independent, ui5UI5 middleware recording OData traffic as mock server datasets
- ui5-plugin-loaderui5-plugin-loaderA UI5 Tooling v4 extension that registers a project's other extensions itself: one entry in ui5.yaml, and every dependency carrying a ui5-plugin-loader.json manifest is mounted as middleware and as a build task.independent, ui5UI5 Tooling v4 extension that registers other extensions
- ui5-deployerui5-deployerA custom module for UI5 Tooling that deploys Fiori/UI5 apps to SAP NetWeaver ABAP, SAP Cloud Platform Neo or Cloud Foundry, configured in a deployer section of ui5.yaml.independent, ui5UI5 Tooling module deploying Fiori/UI5 apps to SAP systems
- ui5-task-dts-generatorui5-task-dts-generatorA UI5 builder task that generates d.ts files, TypeScript type declarations, during the build of a UI5 library written in JavaScript, by wrapping @ui5/dts-generator.independent, ui5UI5 builder task generating d.ts type declarations
- ui5-task-minifierui5-task-minifierA UI5 builder task that minifies the HTML, CSS and JSON files the UI5 builder leaves as they are, with one switch per file type, using html-minifier-terser and clean-css.independent, ui5UI5 builder task minifying HTML, CSS and JSON files
- ui5-middleware-oidcui5-middleware-oidcA UI5 Tooling server middleware that puts an OpenID Connect login in front of the UI5 dev server, built on express-openid-connect, which receives its configuration block as written.independent, ui5UI5 dev server middleware adding an OpenID Connect login
- generator-ui5-library-af-deploygenerator-ui5-library-af-deployA Yeoman generator that writes the SAP BTP Application Frontend deployment configuration, mta.yaml, ui5-deploy.yaml, xs-app.json and xs-security.json, into an existing UI5 library project.independent, ui5Yeoman generator for Application Frontend config in UI5 libraries
- ui5-middleware-destinationui5-middleware-destinationA UI5 Tooling server middleware that proxies requests to backends named in WebIDE-style destination files and serves the routes of a neo-app.json, with Basic Authentication only.independent, ui5UI5 Tooling middleware proxying destinations and neo-app.json routes
- ui5-task-check-eocpui5-task-check-eocpA UI5 builder task that matches the UI5 version in ui5.yaml against the versions retrieved from ui5.sap.com and warns during the build once that version's End of Cloud Provisioning quarter has been reached.independent, ui5UI5 build task warning when the app's UI5 version reaches EOCP
- @ui5/cli@ui5/cliThe UI5 Tooling command line for project setup, the local dev server and the build, which defines a UI5 project's shape and its two extension points, custom middleware and custom tasks.sap official, ui5UI5 Tooling command line for project setup, dev server and build
- ui5-task-btp-manifestui5-task-btp-manifestA UI5 Tooling custom task that writes the surrounding app's sap.cloud service name into the bundled Spreadsheet Importer's manifest at build time, so the two match on SAP BTP.community org, ui5UI5 Tooling task writing the service name into the importer manifest
- ui5-middleware-approuterui5-middleware-approuterA UI5 CLI middleware that puts @sap/approuter in front of the UI5 dev server, proxying it to Cloud Foundry or XS Advanced destinations during development.community org, ui5UI5 CLI middleware proxying the dev server through @sap/approuter
- ui5-middleware-capui5-middleware-capA UI5 CLI middleware that runs a CDS server inside the UI5 dev server, mounted at a path the UI5 project configures, so one command serves the app and its CAP services.community org, ui5UI5 CLI middleware running a CDS server inside the UI5 dev server
- ui5-middleware-hmrui5-middleware-hmrAn experimental UI5 middleware for hot module replacement, swapping a changed module in during development instead of reloading the whole page.community org, ui5Experimental UI5 middleware for hot module replacement
- ui5-middleware-iasyncui5-middleware-iasyncA UI5 dev-server middleware built on browsersync.io that syncs user interactions across connected browsers over a websocket, replaying an action from one browser in the others for manual testing.community org, ui5UI5 middleware syncing interactions across browsers over websocket
- ui5-middleware-indexui5-middleware-indexA UI5 dev-server middleware that delivers a configured welcome page, index.html by default, for the root path instead of the ui5-server directory listing.community org, ui5UI5 middleware serving a chosen welcome page at the root path
- ui5-middleware-livereloadui5-middleware-livereloadA dev-server middleware that adds live reload to the UI5 dev server, reloading the page when the sources in the app's webapp folder change.community org, ui5Live reload middleware for the UI5 dev server
- ui5-middleware-oneloginui5-middleware-oneloginA UI5 dev-server middleware that logs into a system such as SAP Gateway with headless Playwright on the first request and reuses the session cookie for every later request.community org, ui5UI5 middleware logging in with Playwright and reusing the session
- ui5-middleware-serveframeworkui5-middleware-serveframeworkA UI5 middleware that serves a UI5 framework built on the local machine to the dev server, in place of a framework version resolved another way.community org, ui5UI5 middleware serving a locally built UI5 framework
- ui5-middleware-servestaticui5-middleware-servestaticA UI5 dev-server middleware that serves static resources from a filesystem path or an installed npm package path, built on serve-static, with either path settable through an environment variable.community org, ui5UI5 middleware serving static resources from a path or npm package
- ui5-middleware-ui5ui5-middleware-ui5A UI5 middleware that lets one UI5 application be included as a dependency of another and served through that application's dev server.community org, ui5UI5 middleware including one UI5 application in another
- ui5-middleware-webjarsui5-middleware-webjarsA UI5 dev-server middleware that loads JAR files from a configured path and serves the static resources bundled inside them, following the WebJars convention of META-INF/resources/.community org, ui5UI5 middleware serving static resources from JAR files (WebJars)
- ui5-middleware-websocketui5-middleware-websocketUI5 middleware utilities that add WebSocket support to Express-based dev servers such as the UI5 server, which has no WebSocket channel of its own.community org, ui5WebSocket support for Express-based dev servers such as UI5's
- ui5-task-cachebusterui5-task-cachebusterA UI5 builder task that cachebusts a standalone UI5 application by moving its build output into a timestamped subfolder and pointing index.html's resource roots at it.community org, ui5UI5 builder task cachebusting standalone UI5 applications
- ui5-task-copyrightui5-task-copyrightA UI5 builder task that appends copyright headers to TypeScript, JavaScript and XML files on every build, so the header is not added to each source file by hand.community org, ui5UI5 builder task appending copyright headers to source files
- ui5-task-flatten-libraryui5-task-flatten-libraryA UI5 builder task that flattens a library's build output, removing the project namespace and resources folder for deployment to SAP NetWeaver, now also offered by the UI5 CLI itself.community org, ui5UI5 builder task flattening library output for SAP NetWeaver
- ui5-task-i18ncheckui5-task-i18ncheckA UI5 builder task that cross-checks every XML view against the app's i18n properties files and logs a warning where a translation is missing; views created in JavaScript are not checked.community org, ui5UI5 builder task checking XML views for missing i18n texts
- ui5-task-minify-xmlui5-task-minify-xmlA UI5 builder task that minifies XML resources such as views and fragments, which a plain UI5 build otherwise ships unminified.community org, ui5UI5 builder task minifying XML views and fragments
- ui5-task-pwa-enablerui5-task-pwa-enablerA UI5 builder task that turns a UI5 application into a progressive web app by generating a web manifest and a service worker under one of five caching strategies.community org, ui5UI5 builder task turning a UI5 app into a progressive web app
- ui5-task-zipperui5-task-zipperA build task for the UI5 tooling that packages the UI5 build result, the webapp, as a zip archive at the end of the build.community org, ui5Build task packaging the UI5 build result as a zip archive
- ui5-tooling-lessui5-tooling-lessA UI5 CLI extension, a build task and a dev-server middleware, that compiles an app's Less files into CSS at build time and live while the UI5 server runs.community org, ui5UI5 CLI extension compiling Less files into CSS
- ui5-tooling-modulesui5-tooling-modulesA set of UI5 tooling extensions that load and convert plain npm packages into UI5 AMD-like modules, so the UI5 module loader can consume them.community org, ui5UI5 tooling extensions loading npm packages as UI5 modules
- ui5-tooling-stringreplaceui5-tooling-stringreplaceA UI5 CLI extension for string replacement during the build, for placeholders or tokens in source files that have to be replaced at build time.community org, ui5UI5 CLI extension for string replacement during the build
- ui5-tooling-transpileui5-tooling-transpileA UI5 CLI extension that transpiles modern JavaScript or TypeScript during the UI5 build, with a transformJSX option that handles JSX and TSX in the same step.community org, ui5UI5 CLI extension transpiling code during the UI5 build
- @ui5/logger@ui5/loggerUI5 CLI's internal logger, described by its own readme as internal — it appears here because other UI5 tooling depends on it.sap official, ui5Internal logger of the UI5 CLI
- @ui5/middleware-code-coverage@ui5/middleware-code-coverageUI5 CLI server middleware that instruments a project's JavaScript files with Istanbul as the dev server sends them, and generates the coverage report from the records the OpenUI5 QUnit tests send back.sap official, ui5UI5 CLI middleware for Istanbul code coverage
- @ui5/tooling-webc@ui5/tooling-webcDeprecated UI5 Tooling extensions that generate UI5 library wrapper projects for UI5 Web Components and serve them during development; the README points to ui5-tooling-modules instead.sap official, ui5Deprecated UI5 Tooling extensions for UI5 Web Components wrappers
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
Show 34 more
History in the atlas
- First seen.
For your agent
- Ref
artifact:ui5-community-ui5-middleware-simpleproxy- JSON
- /artifacts/ui5-community-ui5-middleware-simpleproxy.json
- MCP
- Connecting an agent