Fix jwt-token
This commit is contained in:
@@ -11,11 +11,20 @@ import time
|
||||
import random
|
||||
import math
|
||||
import argparse
|
||||
import os
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
# Configuration
|
||||
API_BASE_URL = "https://selfservice.cqers.com/drones/api"
|
||||
# Alternative for local testing: "http://localhost:3002/api"
|
||||
# Configuration from environment variables
|
||||
API_BASE_URL = os.getenv('API_BASE_URL', 'http://localhost:3002/api')
|
||||
BASE_PATH = os.getenv('VITE_BASE_PATH', '').rstrip('/')
|
||||
|
||||
# If BASE_PATH is set, construct the full URL
|
||||
if BASE_PATH and not API_BASE_URL.endswith('/api'):
|
||||
# Extract domain from API_BASE_URL and add base path
|
||||
domain = API_BASE_URL.replace('/api', '').replace('/drones/api', '').replace('/uggla/api', '')
|
||||
API_BASE_URL = f"{domain}{BASE_PATH}/api"
|
||||
|
||||
print(f"🔗 Using API Base URL: {API_BASE_URL}")
|
||||
|
||||
# Debug configuration
|
||||
DEBUG_MODE = False # Set to True to enable payload debugging
|
||||
|
||||
Reference in New Issue
Block a user