Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct redirect for code-server #3410

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions news/changelog-1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@

- Remove chapter number of HTML head title when `number-sections` is `false` (#3304).

## Preview

- Correct redirect for VS Code Server (#3352) (Thank you, @benz0li!)

## Miscellaneous

- Work around pandoc strict checking of `number-offset` type. ([#3126](https://github.com/quarto-dev/quarto-cli/issues/3126))
Expand Down
5 changes: 5 additions & 0 deletions src/command/preview/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ import {
isJupyterHubServer,
isRStudioServer,
isRStudioWorkbench,
isVSCodeServer,
vsCodeServerProxyUri,
} from "../../core/platform.ts";
import { isJupyterNotebook } from "../../core/jupyter/jupyter.ts";
import { watchForFileChanges } from "../../core/watch.ts";
Expand Down Expand Up @@ -690,6 +692,9 @@ function pdfFileRequestHandler(
if (new URL(req.url).pathname === "/") {
const url = isRStudioWorkbench()
? await rswURL(port, kPdfJsInitialPath)
: isVSCodeServer()
? vsCodeServerProxyUri()!.replace("{{port}}", `${port}`)
+ kPdfJsInitialPath
: "/" + kPdfJsInitialPath;
return Promise.resolve(serveRedirect(url));
} else {
Expand Down