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