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

fix(printer): fix incorrect artboard port in dev mode #1994

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Hector-Chong
Copy link

When the printer service generates the resume, it reads and replaces PUBLIC_URL to retrieve the URL of the artboard.

However, when PUBLIC_URL is set to its default value, which is http://localhost:3000, the URL of the artboard becomes http://host.docker.internal:3000. The port does not match the default port of the artboard, which is 6173, leading to an error in generating the resume.

      const publicUrl = this.configService.getOrThrow<string>("PUBLIC_URL");

      if ([publicUrl, storageUrl].some((url) => url.includes("localhost"))) {
        // Switch client URL from `localhost` to `host.docker.internal` in development
        // This is required because the browser is running in a container and the client is running on the host machine.
        url = url.replace("localhost", "host.docker.internal");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant