lustre-labs / dev-tools

Lustre's CLI and development tooling: zero-config dev server, bundling, and scaffolding.
45 stars 15 forks source link

Dev server proxy not working properly #41

Closed Robert4S closed 3 months ago

Robert4S commented 3 months ago

I am trying to use the dev server proxy to proxy a lustre frontend to my rust backend, but the proxy urls don't seem to work properly. I run the dev server with the following gleam run -m lustre/dev start --proxy-from=api/ --proxy-to=http://127.0.0.1:8080/api and then doing a gleam_http.post to "api/login", which afaik should route to http://127.0.0.1:8080/api/login, which is a route that works through postman, but with the dev server I just get BadUrl("api/login")

Robert4S commented 3 months ago

it works with the full, non proxied url

hayleigh-dot-dev commented 3 months ago

I'll leave this here for posterity, in case others come across this issue. This is currently an issue with the lustre_http package where requests can only be made to full urls.

Hopefully this will get resolved soon ^.^