Claude Add complete API files with filesystem endpoints
This commit is contained in:
50
config/allowed_paths.yaml
Normal file
50
config/allowed_paths.yaml
Normal file
@ -0,0 +1,50 @@
|
||||
# Configuration des chemins autorisés pour l'accès fichiers
|
||||
# Format YAML
|
||||
|
||||
# Chemins autorisés en LECTURE
|
||||
allowed_read_paths:
|
||||
- /var/www/mathematiques
|
||||
- /var/www/html
|
||||
- /enseignement
|
||||
|
||||
# Chemins autorisés en ÉCRITURE (pour plus tard)
|
||||
allowed_write_paths:
|
||||
- /var/www/mathematiques/_generated
|
||||
- /var/www/mathematiques/uploads
|
||||
|
||||
# Chemins BLOQUÉS (sécurité)
|
||||
blocked_paths:
|
||||
- /etc
|
||||
- /root
|
||||
- /home
|
||||
- /boot
|
||||
- /sys
|
||||
- /proc
|
||||
- /.ssh
|
||||
- /var/log
|
||||
|
||||
# Extensions de fichiers autorisées
|
||||
allowed_extensions:
|
||||
- .php
|
||||
- .html
|
||||
- .css
|
||||
- .js
|
||||
- .json
|
||||
- .xml
|
||||
- .txt
|
||||
- .md
|
||||
- .sql
|
||||
- .py
|
||||
- .sh
|
||||
- .conf
|
||||
- .yaml
|
||||
- .yml
|
||||
|
||||
# Taille maximale de fichier (en octets)
|
||||
max_file_size: 10485760 # 10 MB
|
||||
|
||||
# Nombre max de fichiers retournés par listing
|
||||
max_files_listing: 1000
|
||||
|
||||
# Profondeur max pour récursion
|
||||
max_recursion_depth: 10
|
||||
34
config/example.env
Normal file
34
config/example.env
Normal file
@ -0,0 +1,34 @@
|
||||
# Exemple de configuration - Copier vers .env et modifier les valeurs
|
||||
|
||||
# Application
|
||||
APP_NAME="Jetson Agent API"
|
||||
APP_VERSION="1.0.0"
|
||||
APP_ENV="development" # development, production
|
||||
LOG_LEVEL="info" # debug, info, warning, error
|
||||
|
||||
# API Configuration
|
||||
API_HOST="0.0.0.0"
|
||||
API_PORT=8000
|
||||
API_RELOAD=true # false en production
|
||||
|
||||
# Sécurité JWT
|
||||
JWT_SECRET_KEY="CHANGE_ME_GENERATE_WITH_openssl_rand_hex_32"
|
||||
JWT_ALGORITHM="HS256"
|
||||
JWT_ACCESS_TOKEN_EXPIRE_MINUTES=1440 # 24 heures
|
||||
|
||||
# Chemins de configuration
|
||||
CONFIG_DIR="/home/nicoboy/projects/jetson-agent/config"
|
||||
ALLOWED_PATHS_CONFIG="allowed_paths.yaml"
|
||||
|
||||
# Réseau et sécurité
|
||||
ALLOWED_IPS="192.168.1.0/24,82.67.167.0/24" # Adapte selon ton réseau
|
||||
CORS_ORIGINS="http://localhost:3000,https://82.67.167.147"
|
||||
|
||||
# Rate limiting
|
||||
RATE_LIMIT_ENABLED=true
|
||||
RATE_LIMIT_PER_MINUTE=100
|
||||
|
||||
# Logs
|
||||
LOG_FILE="/home/nicoboy/projects/jetson-agent/logs/api.log"
|
||||
LOG_ROTATION_SIZE=10485760 # 10 MB
|
||||
LOG_BACKUP_COUNT=5
|
||||
Reference in New Issue
Block a user