跳至内容

安全环境变量#

基于文件的配置

您可以为单个变量添加_FILE,以便在单独的文件中提供其配置。详情请参阅将敏感数据保存在单独文件中

变量 类型 默认值 描述
N8N_BLOCK_ENV_ACCESS_IN_NODE Boolean false Whether to allow users to access environment variables in expressions and the Code node (false) or not (true).
N8N_RESTRICT_FILE_ACCESS_TO String Limits access to files in these directories. Provide multiple files as a colon-separated list (":").
N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES Boolean true Set to true to block access to all files in the .n8n directory and user defined configuration files.
N8N_SECURITY_AUDIT_DAYS_ABANDONED_WORKFLOW Number 90 Number of days to consider a workflow abandoned if it's not executed.
N8N_SECURE_COOKIE Boolean true Ensures that cookies are only sent over HTTPS, enhancing security.
N8N_SAMESITE_COOKIE Enum string: strict, lax, none lax Controls cross-site cookie behavior (learn more):
  • strict: 仅针对第一方请求发送。
  • lax (默认): 随顶级导航请求一起发送。
  • none: 在所有上下文中发送(需要HTTPS)。
优云智算