changed the route name

This commit is contained in:
cpu
2025-03-28 17:28:24 +01:00
parent fda9178264
commit 5a3b4974c4
4 changed files with 191 additions and 88 deletions

View File

@@ -1,43 +1,39 @@
# --- Application Configuration ---
# Flic to PWA WebPush Configuration
# --- VAPID Keys (REQUIRED for Web Push) ---
# Generate these once using npx web-push generate-vapid-keys (or other tools)
# Keep the private key SECRET!
# --- VAPID Keys (Required) ---
# Generate using: npx web-push generate-vapid-keys
VAPID_PUBLIC_KEY=
VAPID_PRIVATE_KEY=
VAPID_SUBJECT=mailto:mailto:admin@virtonline.eu # Contact email/URL for push service
# Subject claim for VAPID. Use a 'mailto:' URI or an 'https:' URL identifying your application.
# Example: mailto:admin@yourdomain.com or https://yourdomain.com/contact
VAPID_SUBJECT=mailto:admin@virtonline.eu
# --- Server Configuration ---
PORT=3000 # Internal port for the Node.js app
SUBSCRIPTIONS_FILE=subscriptions.json # Path inside the container
# Subscription Storage
SUBSCRIPTIONS_FILE=subscriptions.json
# --- Authentication (Optional) ---
# If both USERNAME and PASSWORD are set, Basic Auth will be enabled for:
# - POST /subscribe
# - GET /webhook
# Leave blank to disable authentication.
BASIC_AUTH_USERNAME=user12345
BASIC_AUTH_PASSWORD=password
# CORS
# --- CORS Configuration (Optional but Recommended) ---
# Comma-separated list of allowed origins for requests (e.g., your PWA frontend URL)
# If blank or not set, CORS might block browser requests (like from a setup page).
# Use '*' carefully, preferably list specific domains.
ALLOWED_ORIGINS=https://game-timer.virtonline.eu
ALLOWED_METHODS=POST,OPTIONS,GET
ALLOWED_METHODS=POST,GET,OPTIONS
ALLOWED_HEADERS=Content-Type,Authorization
# Logging Configuration
LOG_LEVEL=INFO
# --- Web Push Retry Configuration (Optional) ---
MAX_NOTIFICATION_RETRIES=3 # Number of retries on failure (e.g., DNS issues)
INITIAL_RETRY_DELAY_MS=1000 # Initial delay in milliseconds
# --- Security (Optional) ---
# If you want to add a simple security layer between Flic and this app.
# If set, configure Flic's HTTP request to include an "Authorization: Bearer YOUR_SECRET_VALUE" header.
# use e.g.: openssl rand -hex 32
FLIC_SECRET=
# --- Network Configuration (Optional) ---
DNS_TIMEOUT_MS=5000 # Timeout for DNS lookups (ms)
HTTP_TIMEOUT_MS=10000 # Timeout for outgoing HTTP requests (ms)
# --- DNS and Network Configuration ---
# These settings help with Docker DNS resolution issues (EAI_AGAIN errors)
# Maximum number of retry attempts for failed DNS resolutions
MAX_NOTIFICATION_RETRIES=3
# Initial delay in milliseconds before first retry (will increase with backoff)
INITIAL_RETRY_DELAY_MS=1000
# DNS resolution timeout in milliseconds
DNS_TIMEOUT_MS=5000
# HTTP request timeout in milliseconds
HTTP_TIMEOUT_MS=10000
# --- Logging ---
# Controls log verbosity: error, warn, info, debug
LOG_LEVEL=info