mirror of
https://github.com/langgenius/dify.git
synced 2026-09-21 05:11:22 +08:00
fix(agent): add new envs to .env.example (#39041)
This commit is contained in:
@@ -8,16 +8,16 @@ import "os"
|
||||
|
||||
const (
|
||||
// EnvEnablePathIsolation controls whether Landlock is applied at all.
|
||||
EnvEnablePathIsolation = "ENABLE_PATH_ISOLATION"
|
||||
EnvEnablePathIsolation = "SHELLCTL_ENABLE_PATH_ISOLATION"
|
||||
|
||||
// EnvRWPaths overrides the default RW directories (comma-separated).
|
||||
EnvRWPaths = "LANDLOCK_RW_PATHS"
|
||||
EnvRWPaths = "SHELLCTL_LANDLOCK_RW_PATHS"
|
||||
|
||||
// EnvROPaths overrides the default RO+exec directories (comma-separated).
|
||||
EnvROPaths = "LANDLOCK_RO_PATHS"
|
||||
EnvROPaths = "SHELLCTL_LANDLOCK_RO_PATHS"
|
||||
|
||||
// EnvRWDevPaths overrides the default device files (comma-separated).
|
||||
EnvRWDevPaths = "LANDLOCK_RW_DEV_PATHS"
|
||||
EnvRWDevPaths = "SHELLCTL_LANDLOCK_RW_DEV_PATHS"
|
||||
)
|
||||
|
||||
// --- Agent Stub ---
|
||||
|
||||
@@ -63,10 +63,6 @@ func DefaultConfig(home, cwd, jobDir string) *Config {
|
||||
//
|
||||
// If a variable is set (even to empty string), its value replaces the default.
|
||||
// Set to empty to grant no additional paths beyond $HOME.
|
||||
//
|
||||
// LANDLOCK_RW_PATHS — comma-separated RW dirs (default: empty)
|
||||
// LANDLOCK_RO_PATHS — comma-separated RO dirs (default: system paths)
|
||||
// LANDLOCK_RW_DEV_PATHS — comma-separated dev files (default: /dev/null,...)
|
||||
func ConfigFromEnv(home, cwd, jobDir string) *Config {
|
||||
cfg := DefaultConfig(home, cwd, jobDir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user