Skip to content

fix: Web App share/embed URLs missing non-standard port when APP_WEB_URL is unset #37780

Description

@AlexArtemis

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

V1.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

When accessing Dify via a non-standard port (e.g., http://192.168.113.55:8080) without configuring APP_WEB_URL in .env, the generated Web App share/embed URLs omit the port number (:8080), resulting in broken links.

✔️ Expected Behavior

Dify generated URL should be: http://192.168.113.55:8080/chat/MGZppL0FDhCpU9HC

❌ Actual Behavior

Actual access URL: http://192.168.113.55:8080/chat/MGZppL0FDhCpU9HC

Dify generated URL: http://192.168.113.55/chat/MGZppL0FDhCpU9HC ❌ (missing :8080)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions