Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Langgenius Dify Application Publishing

From Leeroopedia
Knowledge Sources Domains Last Updated
Dify LLM_Applications, Frontend, API 2026-02-12 00:00 GMT

Overview

Description

Application Publishing is the principle governing how a configured and tested Dify application is made available to end users. Publishing transforms an application from a development-only artifact into a live, accessible service through one or more distribution channels.

Dify provides multiple publishing mechanisms:

  • Web App (Site) Publishing -- Enabling the application's web-based frontend via updateAppSiteStatus. When the site status is enabled, the application becomes accessible at a public URL identified by its access_token (e.g., http://dify.app/{access_token}). The site configuration includes:
    • Public title, description, and author information.
    • Theme and color customization.
    • Language settings.
    • Copyright, privacy policy, and custom disclaimer text.
    • Whether to show workflow steps to end users.
    • Custom domain support.
  • API Publishing -- Enabling the application's REST API endpoint via updateAppApiStatus. When the API status is enabled, external systems can interact with the application programmatically through authenticated API calls.
  • Rate Limiting -- Configuring request throttling via updateAppRateLimit to protect the application from abuse. Rate limits can be set per minute (api_rpm, default 60) and per hour (api_rph, default 3600).
  • Access Token Regeneration -- Refreshing the site access token via updateAppSiteAccessToken to invalidate previous URLs and issue new ones, useful for security rotation.

The publishing status for each channel (site and API) is independently togglable, allowing developers to enable web access without API access or vice versa. Both the enable_site and enable_api flags are stored on the App entity.

Usage

Application Publishing is used whenever a developer needs to:

  • Make an application accessible to end users via a web interface.
  • Enable programmatic API access for integration with external systems.
  • Configure rate limits to manage load and prevent abuse.
  • Regenerate access tokens for security purposes.
  • Toggle publishing channels on or off during maintenance or development cycles.
  • Customize the public-facing presentation of the web application.

Theoretical Basis

Application Publishing follows the Feature Toggle pattern: each distribution channel (site, API) is independently controlled by a boolean flag, enabling gradual rollout and instant rollback without code changes. This pattern is central to continuous delivery practices where the deployment of code is decoupled from the release of features.

The rate limiting configuration implements the Throttling Pattern (also known as the Token Bucket or Leaky Bucket algorithm at the infrastructure level), which protects shared resources (LLM API quotas, compute capacity) from overconsumption. The dual rate limits (per-minute and per-hour) provide both burst protection and sustained load management.

The access token mechanism follows the Capability-Based Security model: possessing the token grants access to the application, and token regeneration implements credential rotation, a security best practice that limits the window of exposure if a token is compromised.

From a deployment architecture perspective, the separation of site and API publishing channels reflects the Backend for Frontend (BFF) pattern, where the web application and API consumers may have different requirements for authentication, rate limiting, and response formatting.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment