GUI route misconfiguration or bug ? #22242

Closed
opened 2026-02-21 20:16:17 -05:00 by yindo · 9 comments
Owner

Originally created by @yroffin on GitHub (Feb 17, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.12.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

hi,

i've setup new version 1.12.1 of dify on my k8s cluster (previous version was 1.10.1)
i'm using the helm https://github.com/BorisPolonsky/dify-helm in 0.36.0

i've setup according url:

all work file (i've done an agent base test), but in runapp mode i've some problems

GUI try to find (and have 404)

i think it could be an api route like

is there some variable i forgot to have a well routed GUI path ?

i've check the code ... and i don't find any other variables

✔️ Expected Behavior

in network web browser analysis

GUI should find the api route no ?

Actual Behavior

in network web browser analysis

GUI try to find (and have 404)

Originally created by @yroffin on GitHub (Feb 17, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [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, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.12.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce hi, i've setup new version 1.12.1 of dify on my k8s cluster (previous version was 1.10.1) i'm using the helm https://github.com/BorisPolonsky/dify-helm in 0.36.0 i've setup according url: - name: CONSOLE_API_URL value: "https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx" - name: CONSOLE_WEB_URL value: "https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx" - name: SERVICE_API_URL value: "https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx" - name: APP_WEB_URL value: "https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx" all work file (i've done an agent base test), but in runapp mode i've some problems GUI try to find (and have 404) - https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/webapp/access-mode?appCode=........ => 404 - https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/login/status?app_code=......... => 404 i think it could be an api route like - https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/console/api/system-features => 200 Ok is there some variable i forgot to have a well routed GUI path ? i've check the code ... and i don't find any other variables ### ✔️ Expected Behavior in network web browser analysis GUI should find the api route no ? - https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/webapp/access-mode?appCode=........ => 200 Ok via API call - https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/login/status?app_code=......... => 200 Ok via API call ### ❌ Actual Behavior in network web browser analysis GUI try to find (and have 404) - https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/webapp/access-mode?appCode=........ => 404 - https://console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/login/status?app_code=......... => 404
yindo added the 🐞 bug label 2026-02-21 20:16:17 -05:00
yindo closed this issue 2026-02-21 20:16:17 -05:00
Author
Owner

@yroffin commented on GitHub (Feb 17, 2026):

According url configuration is env vars based (for information)

@yroffin commented on GitHub (Feb 17, 2026): According url configuration is env vars based (for information)
Author
Owner

@dosubot[bot] commented on GitHub (Feb 17, 2026):

Hi @yroffin! I'm Dosu and I’m helping the dify team.

The backend environment variables you've configured (CONSOLE_API_URL, CONSOLE_WEB_URL, SERVICE_API_URL, APP_WEB_URL) are primarily used for OAuth callbacks, CORS configuration, and link generation on the server side. However, they don't control how the frontend routes API calls.

Your 404 errors on /api/webapp/access-mode and /api/login/status are likely caused by missing frontend-specific environment variables. Dify's web app uses two separate prefixes:

  • NEXT_PUBLIC_API_PREFIX - for console API calls like /console/api/system-features (this seems to be working for you)
  • NEXT_PUBLIC_PUBLIC_API_PREFIX - for public/web app API calls like /api/webapp/access-mode and /api/login/status (this appears misconfigured)

These are build-time environment variables for the Next.js frontend. You'll need to set:

NEXT_PUBLIC_API_PREFIX=https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/console/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api

Both should point to your API backend server (the same domain as your working CONSOLE_API_URL), just with different path prefixes. Check if the Helm chart you're using supports these frontend environment variables during the web container build or runtime configuration.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 17, 2026): <!-- Greeting --> Hi @yroffin! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the dify team. <!-- Answer --> The backend environment variables you've configured (`CONSOLE_API_URL`, `CONSOLE_WEB_URL`, `SERVICE_API_URL`, `APP_WEB_URL`) are primarily used for OAuth callbacks, CORS configuration, and link generation on the server side. However, they don't control how the **frontend** routes API calls. Your 404 errors on `/api/webapp/access-mode` and `/api/login/status` are likely caused by missing **frontend-specific** environment variables. Dify's web app uses two separate prefixes: - **`NEXT_PUBLIC_API_PREFIX`** - for console API calls like `/console/api/system-features` (this seems to be working for you) - **`NEXT_PUBLIC_PUBLIC_API_PREFIX`** - for public/web app API calls like `/api/webapp/access-mode` and `/api/login/status` (this appears misconfigured) These are build-time environment variables for the Next.js frontend. You'll need to set: ``` NEXT_PUBLIC_API_PREFIX=https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/console/api NEXT_PUBLIC_PUBLIC_API_PREFIX=https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api ``` Both should point to your API backend server (the same domain as your working `CONSOLE_API_URL`), just with different path prefixes. Check if the [Helm chart](https://github.com/BorisPolonsky/dify-helm) you're using supports these frontend environment variables during the web container build or runtime configuration. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/7c7733ef-364a-44e2-aa80-d8b8ed8c27e0?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20backend%20environment%20variables%20you%27ve%20configured%20%28%60CONSOLE_API_URL%60%2C%20%60CONSOLE_WEB_URL%60%2C%20%60SERVICE_API_URL%60%2C%20%60APP_WEB_URL%60%29%20are%20primarily%20used%20for%20OAuth%20callbacks%2C%20CORS%20configuration%2C%20and%20link%20generation%20on%20the%20server%20side.%20However%2C%20they%20don%27t%20control%20how%20the%20%2A%2Afrontend%2A%2A%20routes%20API%20calls.%0A%0AYour%20404%20errors%20on%20%60/api/webapp/access-mode%60%20and%20%60/api/login/status%60%20are%20likely%20caused%20by%20missing%20%2A%2Afrontend-specific%2A%2A%20environment%20variables.%20Dify%27s%20web%20app%20uses%20two%20separate%20prefixes%3A%0A%0A-%20%2A%2A%60NEXT_PUBLIC_API_PREFIX%60%2A%2A%20-%20for%20console%20API%20calls%20like%20%60/console/api/system-features%60%20%28this%20seems%20to%20be%20working%20for%20you%29%0A-%20%2A%2A%60NEXT_PUBLIC_PUBLIC_API_PREFIX%60%2A%2A%20-%20for%20public/web%20app%20API%20calls%20like%20%60/api/webapp/access-mode%60%20and%20%60/api/login/status%60%20%28this%20appears%20misconfigured%29%0A%0AThese%20are%20build-time%20environment%20variables%20for%20the%20Next.js%20frontend.%20You%27ll%20need%20to%20set%3A%0A%0A%60%60%60%0ANEXT_PUBLIC_API_PREFIX%3Dhttps%3A//api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/console/api%0ANEXT_PUBLIC_PUBLIC_API_PREFIX%3Dhttps%3A//api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api%0A%60%60%60%0A%0ABoth%20should%20point%20to%20your%20API%20backend%20server%20%28the%20same%20domain%20as%20your%20working%20%60CONSOLE_API_URL%60%29%2C%20just%20with%20different%20path%20prefixes.%20Check%20if%20the%20%5BHelm%20chart%5D%28https%3A//github.com/BorisPolonsky/dify-helm%29%20you%27re%20using%20supports%20these%20frontend%20environment%20variables%20during%20the%20web%20container%20build%20or%20runtime%20configuration.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32375)
Author
Owner

@yroffin commented on GitHub (Feb 17, 2026):

@dosu

it don't solve anything, how to check on backend log part (web node pod) if these variables are taken in account
=> i've verified env vars and all is ok

is there at boot time some configuration display ?

@yroffin commented on GitHub (Feb 17, 2026): @dosu it don't solve anything, how to check on backend log part (web node pod) if these variables are taken in account => i've verified env vars and all is ok is there at boot time some configuration display ?
Author
Owner

@dosubot[bot] commented on GitHub (Feb 17, 2026):

Unfortunately, Dify doesn't log configuration values at boot time for the web container. However, you can verify the actual runtime configuration using browser DevTools:

Open your browser's DevTools Console on your Dify page and run:

console.log(document.body.dataset.apiPrefix)
console.log(document.body.dataset.publicApiPrefix)

These values are embedded in the HTML body element at server render time and represent what the frontend is actually using.

Important caveat: NEXT_PUBLIC_* variables are build-time variables in Next.js - they're baked into the JavaScript bundles during the build process. Simply setting them as environment variables on a running container won't work unless:

  1. The Docker entrypoint script runs at container startup and rebuilds, OR
  2. You rebuild the Docker image with the correct --build-arg values

The official Docker entrypoint derives the frontend variables from CONSOLE_API_URL and APP_API_URL:

NEXT_PUBLIC_API_PREFIX=${CONSOLE_API_URL}/console/api
NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/api

Can you share what values the browser DevTools check returns? That will tell us exactly what the frontend is using.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 17, 2026): <!-- Answer --> Unfortunately, Dify doesn't log configuration values at boot time for the web container. However, you can verify the actual runtime configuration using **browser DevTools**: Open your browser's DevTools Console on your Dify page and run: ```javascript console.log(document.body.dataset.apiPrefix) console.log(document.body.dataset.publicApiPrefix) ``` These values are [embedded in the HTML body element at server render time](https://github.com/langgenius/dify/blob/41a4a57d2e9e7d41fee5658f503bd350e4786c82/web/app/layout.tsx#L61) and represent what the frontend is actually using. **Important caveat**: `NEXT_PUBLIC_*` variables are **build-time** variables in Next.js - they're baked into the JavaScript bundles during the build process. Simply setting them as environment variables on a running container won't work unless: 1. The [Docker entrypoint script](https://github.com/langgenius/dify/blob/41a4a57d2e9e7d41fee5658f503bd350e4786c82/web/docker/entrypoint.sh#L18-L19) runs at container startup and rebuilds, OR 2. You rebuild the Docker image with the correct `--build-arg` values The official Docker entrypoint derives the frontend variables from `CONSOLE_API_URL` and `APP_API_URL`: ```bash NEXT_PUBLIC_API_PREFIX=${CONSOLE_API_URL}/console/api NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/api ``` Can you share what values the browser DevTools check returns? That will tell us exactly what the frontend is using. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/fa9dfa05-547a-4094-a497-d96534544760?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Unfortunately%2C%20Dify%20doesn%27t%20log%20configuration%20values%20at%20boot%20time%20for%20the%20web%20container.%20However%2C%20you%20can%20verify%20the%20actual%20runtime%20configuration%20using%20%2A%2Abrowser%20DevTools%2A%2A%3A%0A%0AOpen%20your%20browser%27s%20DevTools%20Console%20on%20your%20Dify%20page%20and%20run%3A%0A%60%60%60javascript%0Aconsole.log%28document.body.dataset.apiPrefix%29%0Aconsole.log%28document.body.dataset.publicApiPrefix%29%0A%60%60%60%0A%0AThese%20values%20are%20%5Bembedded%20in%20the%20HTML%20body%20element%20at%20server%20render%20time%5D%28https%3A//github.com/langgenius/dify/blob/41a4a57d2e9e7d41fee5658f503bd350e4786c82/web/app/layout.tsx%23L61%29%20and%20represent%20what%20the%20frontend%20is%20actually%20using.%0A%0A%2A%2AImportant%20caveat%2A%2A%3A%20%60NEXT_PUBLIC_%2A%60%20variables%20are%20%2A%2Abuild-time%2A%2A%20variables%20in%20Next.js%20-%20they%27re%20baked%20into%20the%20JavaScript%20bundles%20during%20the%20build%20process.%20Simply%20setting%20them%20as%20environment%20variables%20on%20a%20running%20container%20won%27t%20work%20unless%3A%0A%0A1.%20The%20%5BDocker%20entrypoint%20script%5D%28https%3A//github.com/langgenius/dify/blob/41a4a57d2e9e7d41fee5658f503bd350e4786c82/web/docker/entrypoint.sh%23L18-L19%29%20runs%20at%20container%20startup%20and%20rebuilds%2C%20OR%0A2.%20You%20rebuild%20the%20Docker%20image%20with%20the%20correct%20%60--build-arg%60%20values%0A%0AThe%20official%20Docker%20entrypoint%20derives%20the%20frontend%20variables%20from%20%60CONSOLE_API_URL%60%20and%20%60APP_API_URL%60%3A%0A%60%60%60bash%0ANEXT_PUBLIC_API_PREFIX%3D%24%7BCONSOLE_API_URL%7D/console/api%0ANEXT_PUBLIC_PUBLIC_API_PREFIX%3D%24%7BAPP_API_URL%7D/api%0A%60%60%60%0A%0ACan%20you%20share%20what%20values%20the%20browser%20DevTools%20check%20returns%3F%20That%20will%20tell%20us%20exactly%20what%20the%20frontend%20is%20using.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32375)
Author
Owner

@yroffin commented on GitHub (Feb 17, 2026):

@dosu

no need to rebuld anything, env var are ok in my pod, it's just it is not taken in account o nreact part on frontend ... and i donc know why

@yroffin commented on GitHub (Feb 17, 2026): @dosu no need to rebuld anything, env var are ok in my pod, it's just it is not taken in account o nreact part on frontend ... and i donc know why
Author
Owner

@yroffin commented on GitHub (Feb 17, 2026):

@dosu

data-public-api-prefix="/api" shoud be https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api or something like that ?

@yroffin commented on GitHub (Feb 17, 2026): @dosu data-public-api-prefix="/api" shoud be https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api or something like that ?
Author
Owner

@dosubot[bot] commented on GitHub (Feb 17, 2026):

Yes, exactly! data-public-api-prefix should be https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api (or your actual API domain), not just /api.

The reason it's showing /api is that APP_API_URL was empty or unset when the frontend was built/initialized. The entrypoint.sh constructs the prefix like this:

NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/api

If APP_API_URL is empty, you just get /api.

You mentioned you have CONSOLE_API_URL set, but the key variable for data-public-api-prefix is APP_API_URL (not CONSOLE_API_URL). Can you verify that APP_API_URL is set in your web pod? It should be something like:

APP_API_URL=https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx

If it is set but still not being picked up, the Helm chart or Docker image may have been pre-built without this value, and NEXT_PUBLIC_* variables in Next.js are baked at build time. In that case, you'd need to ensure the image is built with the correct values or check if the Helm chart supports runtime configuration injection.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 17, 2026): <!-- Answer --> Yes, exactly! `data-public-api-prefix` should be `https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api` (or your actual API domain), not just `/api`. The reason it's showing `/api` is that `APP_API_URL` was **empty or unset** when the frontend was built/initialized. The [entrypoint.sh](https://github.com/langgenius/dify/blob/41a4a57d2e9e7d41fee5658f503bd350e4786c82/web/docker/entrypoint.sh#L18-L19) constructs the prefix like this: ```bash NEXT_PUBLIC_PUBLIC_API_PREFIX=${APP_API_URL}/api ``` If `APP_API_URL` is empty, you just get `/api`. You mentioned you have `CONSOLE_API_URL` set, but the key variable for `data-public-api-prefix` is **`APP_API_URL`** (not `CONSOLE_API_URL`). Can you verify that `APP_API_URL` is set in your web pod? It should be something like: ``` APP_API_URL=https://api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx ``` If it is set but still not being picked up, the [Helm chart or Docker image may have been pre-built without this value](https://github.com/langgenius/dify/discussions/28296#discussioncomment-14996009), and `NEXT_PUBLIC_*` variables in Next.js are baked at build time. In that case, you'd need to ensure the image is built with the correct values or check if the Helm chart supports runtime configuration injection. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/535627ac-d804-47cc-b9b7-2dda988f6be9?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Yes%2C%20exactly%21%20%60data-public-api-prefix%60%20should%20be%20%60https%3A//api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx/api%60%20%28or%20your%20actual%20API%20domain%29%2C%20not%20just%20%60/api%60.%0A%0AThe%20reason%20it%27s%20showing%20%60/api%60%20is%20that%20%60APP_API_URL%60%20was%20%2A%2Aempty%20or%20unset%2A%2A%20when%20the%20frontend%20was%20built/initialized.%20The%20%5Bentrypoint.sh%5D%28https%3A//github.com/langgenius/dify/blob/41a4a57d2e9e7d41fee5658f503bd350e4786c82/web/docker/entrypoint.sh%23L18-L19%29%20constructs%20the%20prefix%20like%20this%3A%0A%0A%60%60%60bash%0ANEXT_PUBLIC_PUBLIC_API_PREFIX%3D%24%7BAPP_API_URL%7D/api%0A%60%60%60%0A%0AIf%20%60APP_API_URL%60%20is%20empty%2C%20you%20just%20get%20%60/api%60.%0A%0AYou%20mentioned%20you%20have%20%60CONSOLE_API_URL%60%20set%2C%20but%20the%20key%20variable%20for%20%60data-public-api-prefix%60%20is%20%2A%2A%60APP_API_URL%60%2A%2A%20%28not%20%60CONSOLE_API_URL%60%29.%20Can%20you%20verify%20that%20%60APP_API_URL%60%20is%20set%20in%20your%20web%20pod%3F%20It%20should%20be%20something%20like%3A%0A%0A%60%60%60%0AAPP_API_URL%3Dhttps%3A//api.console.dify.xxxxxxxxxxxxxxxxxxxxxxxxxxxx%0A%60%60%60%0A%0AIf%20it%20is%20set%20but%20still%20not%20being%20picked%20up%2C%20the%20%5BHelm%20chart%20or%20Docker%20image%20may%20have%20been%20pre-built%20without%20this%20value%5D%28https%3A//github.com/langgenius/dify/discussions/28296%23discussioncomment-14996009%29%2C%20and%20%60NEXT_PUBLIC_%2A%60%20variables%20in%20Next.js%20are%20baked%20at%20build%20time.%20In%20that%20case%2C%20you%27d%20need%20to%20ensure%20the%20image%20is%20built%20with%20the%20correct%20values%20or%20check%20if%20the%20Helm%20chart%20supports%20runtime%20configuration%20injection.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32375)
Author
Owner

@yroffin commented on GitHub (Feb 17, 2026):

@dosu

it's solved, it missed APP_API_URL env vars in my solution

now APP_API_URL is well setup, and all is ok

@yroffin commented on GitHub (Feb 17, 2026): @dosu it's solved, it missed APP_API_URL env vars in my solution now APP_API_URL is well setup, and all is ok
Author
Owner

@dosubot[bot] commented on GitHub (Feb 17, 2026):

Great, glad to hear it's working now! 🎉

To summarize for anyone else hitting this issue: when deploying Dify on Kubernetes with separate domains, make sure to set APP_API_URL (not just CONSOLE_API_URL) in your web container configuration. This variable is used to construct the NEXT_PUBLIC_PUBLIC_API_PREFIX for frontend API calls to endpoints like /api/webapp/access-mode and /api/login/status.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 17, 2026): <!-- Answer --> Great, glad to hear it's working now! 🎉 To summarize for anyone else hitting this issue: when deploying Dify on Kubernetes with separate domains, make sure to set **`APP_API_URL`** (not just `CONSOLE_API_URL`) in your web container configuration. This variable is used to construct the `NEXT_PUBLIC_PUBLIC_API_PREFIX` for frontend API calls to endpoints like `/api/webapp/access-mode` and `/api/login/status`. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/b7e66427-84fc-465e-88ba-946e54e8b81b?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Great%2C%20glad%20to%20hear%20it%27s%20working%20now%21%20%F0%9F%8E%89%20%0A%0ATo%20summarize%20for%20anyone%20else%20hitting%20this%20issue%3A%20when%20deploying%20Dify%20on%20Kubernetes%20with%20separate%20domains%2C%20make%20sure%20to%20set%20%2A%2A%60APP_API_URL%60%2A%2A%20%28not%20just%20%60CONSOLE_API_URL%60%29%20in%20your%20web%20container%20configuration.%20This%20variable%20is%20used%20to%20construct%20the%20%60NEXT_PUBLIC_PUBLIC_API_PREFIX%60%20for%20frontend%20API%20calls%20to%20endpoints%20like%20%60/api/webapp/access-mode%60%20and%20%60/api/login/status%60.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/32375)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22242