mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 14:22:02 +00:00
This commit refactors the handling of ALLOWED_ROOT_DIRECTORY by removing legacy support for ALLOWED_PROJECT_DIRS and simplifying the security logic. Key changes include: - Removed deprecated ALLOWED_PROJECT_DIRS references from .env.example and security.ts. - Updated initAllowedPaths() to focus solely on ALLOWED_ROOT_DIRECTORY and DATA_DIR. - Enhanced logging for ALLOWED_ROOT_DIRECTORY configuration status. - Adjusted route handlers to utilize the new workspace directory logic. - Introduced a centralized storage module for localStorage operations to improve consistency and error handling. These changes aim to enhance security and maintainability by consolidating directory management into a single variable. Tests: All unit tests passing.
51 lines
1.5 KiB
Plaintext
51 lines
1.5 KiB
Plaintext
# Automaker Server Configuration
|
|
# Copy this file to .env and configure your settings
|
|
|
|
# ============================================
|
|
# REQUIRED
|
|
# ============================================
|
|
|
|
# Your Anthropic API key for Claude models
|
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
|
|
# ============================================
|
|
# OPTIONAL - Security
|
|
# ============================================
|
|
|
|
# API key for authenticating requests (leave empty to disable auth)
|
|
# If set, all API requests must include X-API-Key header
|
|
AUTOMAKER_API_KEY=
|
|
|
|
# Root directory for projects and file operations
|
|
# If set, users can only create/open projects and files within this directory
|
|
# Recommended for sandboxed deployments (Docker, restricted environments)
|
|
# Example: ALLOWED_ROOT_DIRECTORY=/projects
|
|
ALLOWED_ROOT_DIRECTORY=
|
|
|
|
# CORS origin - which domains can access the API
|
|
# Use "*" for development, set specific origin for production
|
|
CORS_ORIGIN=*
|
|
|
|
# ============================================
|
|
# OPTIONAL - Server
|
|
# ============================================
|
|
|
|
# Port to run the server on
|
|
PORT=3008
|
|
|
|
# Data directory for sessions and metadata
|
|
DATA_DIR=./data
|
|
|
|
# ============================================
|
|
# OPTIONAL - Terminal Access
|
|
# ============================================
|
|
|
|
# Enable/disable terminal access (default: true)
|
|
TERMINAL_ENABLED=true
|
|
|
|
# Password to protect terminal access (leave empty for no password)
|
|
# If set, users must enter this password before accessing terminal
|
|
TERMINAL_PASSWORD=
|
|
|
|
ENABLE_REQUEST_LOGGING=false
|