Some icons are lost when CONSOLE-API_URL is set #4085

Closed
opened 2026-02-21 18:04:41 -05:00 by yindo · 2 comments
Owner

Originally created by @chairui2001 on GitHub (Jun 13, 2024).

Originally assigned to: @iamjoel, @takatost on GitHub.

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.6.10

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

Taking the tool list as an example, the icon address of the tool is /console/API/workspaces/current/tool provider/builtin/Google/icon, lacking the CONSOLE-API_URL prefix, which leads to the inability to obtain the icon when the CONSOLE-API_URL is different from the front-end address.

✔️ Expected Behavior

Icons can be displayed normally after configuring CONSOLE-API_URL

Actual Behavior

Icon cannot be displayed properly after configuring CONSOLE-API_URL

Originally created by @chairui2001 on GitHub (Jun 13, 2024). Originally assigned to: @iamjoel, @takatost on GitHub. ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.6.10 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce Taking the tool list as an example, the icon address of the tool is /console/API/workspaces/current/tool provider/builtin/Google/icon, lacking the CONSOLE-API_URL prefix, which leads to the inability to obtain the icon when the CONSOLE-API_URL is different from the front-end address. ### ✔️ Expected Behavior Icons can be displayed normally after configuring CONSOLE-API_URL ### ❌ Actual Behavior Icon cannot be displayed properly after configuring CONSOLE-API_URL
yindo added the 🐞 bug label 2026-02-21 18:04:41 -05:00
yindo closed this issue 2026-02-21 18:04:41 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 13, 2024):

Hello, @chairui2001! I'm here to help you with any bugs, questions, or contributions you have for the Dify repository. I can assist you while you wait for the human maintainer.

To ensure that icons are displayed properly after configuring CONSOLE-API_URL in version 0.6.10 of the self-hosted Dify, you need to make sure that the environment variables in your .env file are correctly set up. Specifically, you should configure the NEXT_PUBLIC_API_PREFIX and NEXT_PUBLIC_PUBLIC_API_PREFIX to point to the correct URLs for your console and web app services.

Here is an example configuration from the web/.env.example file:

# For production release, change this to PRODUCTION
NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT
# The deployment edition, SELF_HOSTED
NEXT_PUBLIC_EDITION=SELF_HOSTED
# The base URL of console application, refers to the Console base URL of WEB service if console domain is
# different from api or web app domain.
# example: http://cloud.dify.ai/console/api
NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api
# The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from
# console or api domain.
# example: http://udify.app/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api

# SENTRY
NEXT_PUBLIC_SENTRY_DSN=

Additionally, ensure that the following environment variables are correctly set in your configuration:

  • CONSOLE_API_URL: The backend URL of the console API. Example: https://api.console.dify.ai
  • CONSOLE_WEB_URL: The front-end URL of the console web. Example: https://console.dify.ai
  • SERVICE_API_URL: The URL for the service API. Example: https://api.dify.ai
  • APP_API_URL: The backend URL for the WebApp API. Example: https://app.dify.ai
  • APP_WEB_URL: The URL for the WebApp. Example: https://api.app.dify.ai

These variables help in setting up the correct URLs for your services, which in turn ensures that icons and other resources are loaded properly [1][2].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Jun 13, 2024): <!-- Greeting --> Hello, @chairui2001! I'm here to help you with any bugs, questions, or contributions you have for the Dify repository. I can assist you while you wait for the human maintainer. <!-- Answer --> To ensure that icons are displayed properly after configuring `CONSOLE-API_URL` in version 0.6.10 of the self-hosted Dify, you need to make sure that the environment variables in your `.env` file are correctly set up. Specifically, you should configure the `NEXT_PUBLIC_API_PREFIX` and `NEXT_PUBLIC_PUBLIC_API_PREFIX` to point to the correct URLs for your console and web app services. Here is an example configuration from the `web/.env.example` file: ```example # For production release, change this to PRODUCTION NEXT_PUBLIC_DEPLOY_ENV=DEVELOPMENT # The deployment edition, SELF_HOSTED NEXT_PUBLIC_EDITION=SELF_HOSTED # The base URL of console application, refers to the Console base URL of WEB service if console domain is # different from api or web app domain. # example: http://cloud.dify.ai/console/api NEXT_PUBLIC_API_PREFIX=http://localhost:5001/console/api # The URL for Web APP, refers to the Web App base URL of WEB service if web app domain is different from # console or api domain. # example: http://udify.app/api NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api # SENTRY NEXT_PUBLIC_SENTRY_DSN= ``` Additionally, ensure that the following environment variables are correctly set in your configuration: - `CONSOLE_API_URL`: The backend URL of the console API. Example: `https://api.console.dify.ai` - `CONSOLE_WEB_URL`: The front-end URL of the console web. Example: `https://console.dify.ai` - `SERVICE_API_URL`: The URL for the service API. Example: `https://api.dify.ai` - `APP_API_URL`: The backend URL for the WebApp API. Example: `https://app.dify.ai` - `APP_WEB_URL`: The URL for the WebApp. Example: `https://api.app.dify.ai` These variables help in setting up the correct URLs for your services, which in turn ensures that icons and other resources are loaded properly <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/.env.example)</sup><sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/getting-started/install-self-hosted/environments.md)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@chairui2001 commented on GitHub (Jun 17, 2024):

@crazywoola @takatost @iamjoel hi all, I'm sorry. I tried it and found that it was because the CONSOLE-WEB_URL was not configured before, but it worked fine after configuration. The relative path returned when not configured, and the absolute path returned after configuration

@chairui2001 commented on GitHub (Jun 17, 2024): @crazywoola @takatost @iamjoel hi all, I'm sorry. I tried it and found that it was because the CONSOLE-WEB_URL was not configured before, but it worked fine after configuration. The relative path returned when not configured, and the absolute path returned after configuration
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#4085