HTTP-server to proxy all RSS fetching request from web client.
User could use it to bypass censorship or to try web client before they install upcoming extension (to bypass CORS limit of web app).
Server could use this proxy at /proxy/* endpoint.
See the full architecture guide first.
cd proxy && pnpm test: run all proxy tests.cd proxy && pnpm start: run proxy server.cd proxy && pnpm build: prepare deploy files with production dependencies only.cd proxy && pnpm production: start production build of the proxy server.
- Allows only GET requests and HTTP/HTTPS protocols.
- Does not allow requests to in-cloud IP addresses like
127.0.0.1. - Removes cookie headers.
- Sets user’s IP in
X-Forwarded-Forheader. - Has timeout and response size limit.
To run proxy server you must define environment variables:
PORTwith HTTP post to listen. It is Google Cloud Run convention.PROXY_ORIGINwith RegExp forOriginheader.
Example:
PORT=8080 PROXY_ORIGIN=^http:\\/\\/localhost:5173$ pnpm startFor deploy we:
- Use
pnpm deployto createdist/only with production dependencies. - Build Docker image with Node.js.
- Run this image on Google Cloud Run.
We have 2 proxy servers:
proxy.slowreader.appworks only for production clients.dev-proxy.slowreader.appworks with staging.
All Google Cloud settings are documented in script.