A configurable reverse proxy that forwards API requests from browser front ends to remote back-end services.
- Proxies HTTP/HTTPS requests to a backend.
- Rewrites response headers (hosts, ports).
- Can rewrite Set-Cookie headers.
- Supports HTTP and HTTPS.
- Can be configured through environment variables.
The Solobase-Proxy-Agent a lightweight reverse proxy designed for browser-based applications. It forwards requests to a configurable backend and can rewrite response headers and cookies. It is useful when browsers cannot communicate directly with a backend because of deployment topology, host name differences or networking constraints.
Browser -> Solobase-Proxy-Agent -> Backend Host
If you find this extension useful, you can support development via PayPal:
Thank you for helping keep this project maintained and improving!
written by: Mark Samios @enigma1
- Tested on node v20-22
- Tested on npm v10-11
git clone Solobase-Proxy-Agent cd folder npm i cp .env.template .env
You can modify the .env file for SSL or NON-SSL modes. If SSL_ENABLED=1 (default), the proxy requires a private key and certificate.
To create a certificate...
openssl req -x509 -newkey rsa:4096 -nodes \
-keyout server.key \
-out server.crt \
-days 1825Configure the following variables:
TLS_KEY=/path/to/server.key
TLS_CERT=/path/to/server.crtWhen SSL_ENABLED=0, Solobase-Proxy-Agent runs over plain HTTP and the TLS variables are ignored.
When COOKIE_USE_DOMAIN=0 (default), Solobase-Proxy-Agent removes the Domain parameter from Set-Cookie headers thus allowing the browser to create host-only cookies. Set it to 1 to allow the parameter to pass through the proxy from the upstream host.
For local installations where the backend uses a self-signed certificate, set NODE_TLS_REJECT_UNAUTHORIZED=0. For environments using certificates issued by a trusted CA, leave verification enabled (1 is Default).
For development use
npm run dev
otherwise for production
npm run build
npm run start
Output files will be generated under the dist folder
This project consists of 3 parts. Aside of the Soloabase-Proxy-Agent
The Solobase SPA front end is located here: https://github.com/enigma1/Solobase-SPA
The Solobase Server is located here: https://github.com/enigma1/Solobase-Server
GNU General Public License (GPL) v3