the-difference-engine / ksf

7 stars 1 forks source link

Staging frontend and backend are disconnected due to proxy setup #144

Closed jsegal-tde closed 3 years ago

jsegal-tde commented 3 years ago

Currently the proxy for talking between the app and the api use relative paths. This causes a search done on https://ksf-stg.herokuapp.com/ to request data from https://ksf-stg.herokuapp.com/nominations and that should go to the API route.

This works locally because of the proxy set up in the app's package.json https://github.com/the-difference-engine/ksf/blob/develop/packages/app/package.json#L5

We need a way to have staging route to the correct URL as well.

One approach is using - https://www.npmjs.com/package/http-proxy-middleware