-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdefaults.py
More file actions
27 lines (19 loc) · 1012 Bytes
/
defaults.py
File metadata and controls
27 lines (19 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""
Heartbeat Service default settings.
Settings here may be overridden by settings in development, test, production, etc...
"""
import os
# Flask specific settings: https://flask.palletsprojects.com/en/latest/config/#builtin-configuration-values
from common.entities import Service
PROPAGATE_EXCEPTIONS: bool | None = None
SERVER_NAME: str | None = os.environ.get("AGENT_API_HOSTNAME") # Use flask defaults if none set
USE_X_SENDFILE: bool = False # If we serve files enable this in production settings when webserver support configured
# Application settings
API_PREFIX: str = "agent"
"""Prefix for all API endpoints."""
AUTHENTICATION_EXCLUDED_ROUTES: tuple[str, ...] = ("health.readyz", "health.livez")
"""Flask route names which do not need an authenticated JWT or API key."""
SERVICE_NAME: str = Service.AGENT_API.name
"""Name given to the service; used for validating service account keys."""
MAX_REQUEST_BODY_SIZE: int = 102_400 # 100KB (100 * 1024)
"""HTTP request max body size in bytes."""