In general you want to make sure that the cookie is send to the backend (cookie domain etc.), and then you can do the whoami verification there. For more advanced cases there is the JWT conversion:
https://www.ory.sh/docs/identities/session-to-jwt-cors
However, we recommend to always do the session check over whoami if there is no blocker there. The API is highly optimized for latency on our side, including edge caching if enabled.