lazyflat: combined alert + apply behind authenticated web UI
Three isolated services (alert scraper, apply HTTP worker, web UI+DB) with argon2 auth, signed cookies, CSRF, rate-limited login, kill switch, apply circuit breaker, audit log, and strict CSP. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
69f2f1f635
46 changed files with 4183 additions and 0 deletions
12
apply/utils.py
Normal file
12
apply/utils.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import logging
|
||||
|
||||
logger = logging.getLogger("flat-apply")
|
||||
|
||||
def str_to_preview(string, max_length):
|
||||
if not max_length > 3:
|
||||
raise ValueError('max_length must be greater than 3')
|
||||
|
||||
first_line = string.split('\n')[0]
|
||||
if len(first_line) > max_length:
|
||||
return first_line[:max_length-3] + '...'
|
||||
return first_line
|
||||
Loading…
Add table
Add a link
Reference in a new issue