Preflight checklist
Describe the bug
I noticed that making a request through an Ory Tunnel is roughly 2x slower than making a request directly to Ory.
I think the culprit is here: https://github.com/ory/cli/blob/5e5efa77c077225c16416d85984d0a311f02e82e/cmd/cloudx/proxy/proxy.go#L180C1-L181C1
My Go is not great, but if I understand correctly, this will call Ory for every request the tunnel/proxy is receiving, even if that request is /sessions/whoami? This means that the identity of the user is verified first and then the actual request is handled, which makes sense for the Ory Proxy when it proxies requests to a separate backend service, but perhaps doesn't make sense if the proxy or tunnel are actually proxying a request to Ory?
Reproducing the bug
- Get a session token or cookie from an Ory session
- Call Ory directly and time the request duration
- Call Ory through an Ory Tunnel and time the request duration
I can provide a more detailed steps to reproduce, but I think the difficulty here is that it requires the specific Ory session token and Ory domain to try with
Relevant log output
No response
Relevant configuration
No response
Version
v0.1.36
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response
Preflight checklist
Describe the bug
I noticed that making a request through an Ory Tunnel is roughly 2x slower than making a request directly to Ory.
I think the culprit is here: https://github.com/ory/cli/blob/5e5efa77c077225c16416d85984d0a311f02e82e/cmd/cloudx/proxy/proxy.go#L180C1-L181C1
My Go is not great, but if I understand correctly, this will call Ory for every request the tunnel/proxy is receiving, even if that request is
/sessions/whoami? This means that the identity of the user is verified first and then the actual request is handled, which makes sense for the Ory Proxy when it proxies requests to a separate backend service, but perhaps doesn't make sense if the proxy or tunnel are actually proxying a request to Ory?Reproducing the bug
I can provide a more detailed steps to reproduce, but I think the difficulty here is that it requires the specific Ory session token and Ory domain to try with
Relevant log output
No response
Relevant configuration
No response
Version
v0.1.36
On which operating system are you observing this issue?
Ory Network
In which environment are you deploying?
Ory Network
Additional Context
No response