You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At this point, you should be able to access code-server via
@@ -292,7 +290,9 @@ redirect all HTTP requests to HTTPS.
292
290
> You can use [Let's Encrypt](https://letsencrypt.org/) to get a TLS certificate
293
291
> for free.
294
292
295
-
Note: if you set `proxy_set_header Host $host;` in your reverse proxy config, it will change the address displayed in the green section of code-server in the bottom left to show the correct address.
293
+
Note: if you set `proxy_set_header Host $host;` in your reverse proxy config, it
294
+
will change the address displayed in the green section of code-server in the
295
+
bottom left to show the correct address.
296
296
297
297
## Accessing web services
298
298
@@ -378,14 +378,16 @@ PUBLIC_URL=/absproxy/3000 \
378
378
BROWSER=none yarn start
379
379
```
380
380
381
-
You should then be able to visit `https://my-code-server-address.io/absproxy/3000` to see your app exposed through
382
-
code-server!
381
+
You should then be able to visit
382
+
`https://my-code-server-address.io/absproxy/3000` to see your app exposed
383
+
through code-server.
383
384
384
385
> We highly recommend using the subdomain approach instead to avoid this class of issue.
385
386
386
387
### Proxying to a Vue app
387
388
388
-
Similar to the situation with React apps, you have to make a few modifications to proxy a Vue app.
389
+
Similar to the situation with React apps, you have to make a few modifications
390
+
to proxy a Vue app.
389
391
390
392
1. add `vue.config.js`
391
393
2. update the values to match this (you can use any free port):
@@ -406,7 +408,8 @@ Read more about `publicPath` in the [Vue.js docs](https://cli.vuejs.org/config/#
406
408
407
409
### Proxying to an Angular app
408
410
409
-
In order to use code-server's built-in proxy with Angular, you need to make the following changes in your app:
411
+
In order to use code-server's built-in proxy with Angular, you need to make the
412
+
following changes in your app:
410
413
411
414
1. use `<base href="./.">` in `src/index.html`
412
415
2. add `--serve-path /absproxy/4200` to `ng serve` in your `package.json`
@@ -415,7 +418,8 @@ For additional context, see [this GitHub Discussion](https://github.com/coder/co
415
418
416
419
### Proxying to a Svelte app
417
420
418
-
In order to use code-server's built-in proxy with Svelte, you need to make the following changes in your app:
421
+
In order to use code-server's built-in proxy with Svelte, you need to make the
422
+
following changes in your app:
419
423
420
424
1. Add `svelte.config.js` if you don't already have one
421
425
2. Update the values to match this (you can use any free port):
@@ -436,9 +440,19 @@ For additional context, see [this Github Issue](https://github.com/sveltejs/kit/
436
440
437
441
### Prefixing `/absproxy/<port>` with a path
438
442
439
-
This is a case where you need to serve an application via `absproxy` as explained above while serving `codeserver` itself from a path other than the root in your domain.
443
+
This is a case where you need to serve an application via `absproxy` as
444
+
explained above while serving code-server itself from a path other than the root
445
+
in your domain.
440
446
441
-
For example: `http://my-code-server.com/user/123/workspace/my-app`. To achieve this result:
447
+
For example: `http://my-code-server.com/user/123/workspace/my-app`. To achieve
448
+
this result:
442
449
443
-
1. Start codeserver with the switch `--abs-proxy-base-path=/user/123/workspace`
450
+
1. Start code-server with the switch `--abs-proxy-base-path=/user/123/workspace`
444
451
2. Follow one of the instructions above for your framework.
452
+
453
+
### Preflight requests
454
+
455
+
By default, if you have auth enabled, code-server will authenticate all proxied
456
+
requests including preflight requests. This can cause issues because preflight
457
+
requests do not typically include credentials. To allow all preflight requests
458
+
through the proxy without authentication, use `--skip-auth-preflight`.
0 commit comments