winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.97k stars 196 forks source link

Tunnel links in Wing Console won't respect URL routes #6635

Open eladb opened 3 months ago

eladb commented 3 months ago

I tried this:

bring cloud;

let api = new cloud.Api();

api.get("/boom", inflight (req) => {
  return {
    body: "boom!"
  };
});

new cloud.Endpoint("{api.url}/boom");

This happened:

image

When I click on the endpoint before it is tunneled, the HTTP body response is "boom!".

After I create a tunnel, the response is "Cannot GET /".

A simple solution to this would be to just include the "/boom" in the Wing Console's Public URL.

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes