Files
news-platform/bridge/.env.example
José Alves 6d54443539
Tests / bridge tests (push) Successful in 54s
Tests / writer-pipeline tests (push) Successful in 57s
Tests / frontend lib tests (push) Successful in 54s
Tests / writer-pipeline tests (pull_request) Successful in 43s
Tests / bridge tests (pull_request) Successful in 41s
Tests / frontend lib tests (pull_request) Successful in 40s
feat(bridge): auth endpoints + homepage 24 latest items (BIT-26752)
- POST /auth/login — validates credentials via WP wp-login.php (server-side),
  issues HttpOnly np_sid session cookie backed by Redis/in-memory
- POST /auth/register — creates subscriber via admin app password, auto-login
- POST /auth/logout — destroys session, clears cookie
- GET /auth/session — returns current WpSessionUser or 401
- LATEST_COUNT 12 → 24 on /homepage (WP fetch budget already covered the delta)
- .env.example: WP_ADMIN_USER, WP_ADMIN_APP_PASSWORD, SESSION_TTL_SECONDS

Paperclip-Issue: BIT-26752
Paperclip-Agent: cto
2026-07-17 08:34:33 +00:00

44 lines
1.4 KiB
Bash

# Bridge server port (default: 3200)
PORT=3200
# Host/domain used when no Host header is present (dev fallback)
DEFAULT_HOST=localhost
# Absolute path to config/domains/ directory
DOMAINS_CONFIG_PATH=../config/domains
# Redis connection URL (optional; if unset, in-process Map cache is used)
REDIS_URL=redis://127.0.0.1:6379
# Cache TTLs (seconds)
CACHE_FRESH_TTL=60
CACHE_STALE_TTL=300
# Rate limit: max requests per window per IP
RATE_LIMIT_MAX=100
RATE_LIMIT_WINDOW_MS=60000
# Log level: fatal | error | warn | info | debug | trace
LOG_LEVEL=info
# AndebolTV / Pixellot OTT — live stream detection for andebol.net agenda (public client key)
# ANDEBOLTV_API_BASE=https://fpa.watch.pixellot.tv
# ANDEBOLTV_PORTAL_URL=https://andeboltv.fpa.pt
# ANDEBOLTV_API_KEY=
# ANDEBOLTV_FETCH_TIMEOUT_MS=15000
# ANDEBOLTV_LIST_SIZE=48
# Auth — WP admin Application Password for user create/lookup (Settings → Users → Application Passwords)
# WP_ADMIN_USER=admin
# WP_ADMIN_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
# Session cookie lifetime in seconds (default: 604800 = 7 days)
# SESSION_TTL_SECONDS=604800
# Error hub ingest (errors.bitreport.pt) — vault only; leave empty in Git examples
# ERROR_REPORTING_ENDPOINT=https://errors.bitreport.pt
# ERROR_REPORTING_TOKEN=
ERROR_REPORTING_PROJECT_NAME=news-platform-bridge
ERROR_REPORTING_PROJECT_SLUG=news-platform
ERROR_REPORTING_GITEA_REPO=BitReport.pt/news-platform
# ERROR_REPORTING_DISABLED=1