Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -45,11 +45,11 @@ TIMEOUT_DURATION = 900 # Timeout-Dauer in Sekunden (scheint angemessen)
|
|
45 |
IMAGE_STORAGE_PATH = DOWNLOAD_DIR
|
46 |
|
47 |
app = FastAPI()
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
# StaticFiles Middleware hinzufügen (korrekt und wichtig!)
|
54 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
55 |
app.mount("/flux-pics", StaticFiles(directory=IMAGE_STORAGE_PATH), name="flux-pics")
|
|
|
45 |
IMAGE_STORAGE_PATH = DOWNLOAD_DIR
|
46 |
|
47 |
app = FastAPI()
|
48 |
+
security = HTTPBasic()
|
49 |
|
50 |
+
# Umgebungsvariablen für Benutzername und Passwort
|
51 |
+
USERNAME = os.getenv("CF_USER", "default_user")
|
52 |
+
PASSWORD = os.getenv("CF_PASSWORD", "default_password")
|
53 |
# StaticFiles Middleware hinzufügen (korrekt und wichtig!)
|
54 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
55 |
app.mount("/flux-pics", StaticFiles(directory=IMAGE_STORAGE_PATH), name="flux-pics")
|