sfbrigade / sf-lifeline

GNU Affero General Public License v3.0
7 stars 4 forks source link

Fix incorrect proxy config #19

Closed samau3 closed 10 months ago

samau3 commented 10 months ago

Currently, the vite proxy configuration is making requests to http://localhost:5000 instead of http://0.0.0.0:5100. By adding the rewrite option parameter, this PR resolves that issue and properly makes requests to the server.

samau3 commented 10 months ago

I don't think we should add this rewrite. The server API endpoints that we eventually write should start with /api so that they are distinctly namespaced in their path.

Makes sense! I originally opened this PR since I realized it was not working with our current route set up and found the rewrite option was necessary. Just tested it out with a temporary /api prefixed route and the existing vite config correctly proxies without adding a rewrite once we starting using routes with that namespace. Closing this PR as it is no longer necessary!