Skip to content

Commit

Permalink
Fix vite development for desktop websocket endpoint (#23815)
Browse files Browse the repository at this point in the history
* sets changeOrigin to false

* fixes README
  • Loading branch information
Isaiah Becker-Mayer authored Mar 30, 2023
1 parent 2e180e4 commit f805722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ mkdir -p certs && mkcert -cert-file certs/server.crt -key-file certs/server.key
(Note: the `certs/` directory in this repo is ignored by git, so you can place your certificate/keys
in there without having to worry that they'll end up in a commit.)


#### Certificates in an alternative location

If you already have local certificates, you can set the environment variables:
Expand Down Expand Up @@ -218,7 +217,7 @@ proxy_service:
public_addr: ['proxy.127.0.0.1.nip.io']
```
Then start the dev server like `yarn start-teleport --target=https://proxy.127.0.0.1.nip.io:3080` and access it at https://proxy.127.0.0.1.nip.io:8080.
Then start the dev server like `PROXY_TARGET=https://proxy.127.0.0.1.nip.io:3080 yarn start-teleport` and access it at https://proxy.127.0.0.1.nip.io:8080.

### Adding Packages/Dependencies

Expand Down
2 changes: 1 addition & 1 deletion web/packages/build/vite/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function createViteConfig(
config.server.proxy = {
'^\\/v1\\/webapi\\/sites\\/(.*?)\\/connect': {
target: `wss://${target}`,
changeOrigin: true,
changeOrigin: false,
secure: false,
ws: true,
},
Expand Down

0 comments on commit f805722

Please sign in to comment.