Files
Ivan Starkov ed2645292b Add support of saas edge-api trpc preview router (#971)
## Description

1. What is this PR about (link the issue and add a short description)

This branch will allow preview deployments of trpc authorization and
other saas services
Currently in this branch following variables are set:

```env
TRPC_SERVER_URL=https://wstd.work/services
TRPC_SERVER_API_TOKEN=secrettoken
```
It should use preview saas trpc service having `ory_setup` name
Here `https://wstd.work/services` is router url, router using
`x-branch-name` reroutes traffic to the right saas preview

This is for test ONLY, variables would be removed if all is ok and
testing will proceed on saas side

## Steps for reproduction

Create a new Project, create auth tokens, and check it works.
Check saas service preview logs that requests are there.



## Code Review

- [ ] hi @kof, I need you to do
  - conceptual review (architecture, feature-correctness)
  - detailed review (read every line)
  - test it on preview

## Before requesting a review

- [x] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")

## Before merging

- [x] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio-designer/blob/main/apps/designer/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `designer/env-check.js` if mandatory
2023-02-10 12:13:57 +03:00
..
2023-02-01 10:51:20 +03:00