mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 10:36:07 +00:00
feat: add authentication and configuration for sync operations
- Implemented SyncAuth to control sync access with server-only mode and secret key authorization - Consolidated environment variables into single .env.example with improved sync configuration - Protected all sync API endpoints (ubuntu, fedora, arch, homebrew, winget) with authentication checks
This commit is contained in:
+11
-2
@@ -12,6 +12,15 @@ NEXTAUTH_SECRET=your_secret_here
|
||||
# API Configuration
|
||||
API_BASE_URL=http://localhost:3000/api
|
||||
|
||||
# Cryptomus API Configuration
|
||||
# Get these from your Cryptomus merchant dashboard: https://cryptomus.com/merchant
|
||||
CRYPTOMUS_MERCHANT_ID=your_merchant_id_here
|
||||
CRYPTOMUS_PAYMENT_API_KEY=your_payment_api_key_here
|
||||
|
||||
# Sync Configuration
|
||||
SYNC_ENABLED=true
|
||||
SYNC_INTERVAL=3600000 # 1 hour in milliseconds
|
||||
# Enable sync operations only from the server itself (set to 'true' on production server)
|
||||
SYNC_SERVER_ONLY=false
|
||||
# Automatic sync frequency in days (set to 0 to disable automatic sync)
|
||||
AUTO_SYNC_DAYS=1
|
||||
# Secret key to authorize sync operations from server
|
||||
SYNC_SECRET_KEY=your_sync_secret_key_here
|
||||
|
||||
Reference in New Issue
Block a user