Short Problem Statement:
I want to use cargo web start
in a way such that all post/get requests to /api
gets forwarded to https://foobar.com/api
(and the response forwarded back through cargo web start.
Longer Problem Statement:
I am building an app with client side = rust/wasm32, server side = rust/aws lambda (via musl). Right now, when I work on the client side, it has no access to the aws lambda functions, and as a result, many things are not easy to test.
I don't want to edit aws lambda config to eliminate cross origin checks.
What I want is to modify my localhost / local dev environment, so that
- browser is pointed at :localhost:????
cargo web start
- browser still makes requests to
/api
-
cargo web start
or something else, intercepts these api requests, forwards it to foobar.com, and forwards the response back to the browser