docs: document server-side rendering pipeline, response timing middleware, and Telegram pairing API
- Add comprehensive documentation for backend content rendering in AGENTS.md, detailing the new `render_content` and `render_title` Jinja globals built on mistune with media processing, emoji shortcodes, and XSS protection
- Document the `X-Response-Time` header and bottom-left render time indicator in README.md
- Update bot token pricing documentation to clarify fallback vs gateway cost headers
- Add `email_accounts` to soft-delete tables and `idx_users_role` composite index in database schema
- Implement `telegram_pairings` and `telegram_links` table creation with column migration and indexes
- Add `/profile/{username}/telegram` endpoint to docs API with request/unpair actions
- Register `TelegramService` in main.py lifespan and add `response_timing` middleware emitting `X-Response-Time` header
- Introduce `TelegramPairForm` model and `guard_public_host_sync` synchronous host validation function
This commit is contained in:
@@ -10,6 +10,7 @@ from devplacepy.utils import (
|
||||
create_session,
|
||||
get_current_user,
|
||||
register_account_async,
|
||||
cookie_secure,
|
||||
)
|
||||
from devplacepy.seo import base_seo_context
|
||||
from devplacepy.models import SignupForm
|
||||
@@ -95,7 +96,12 @@ async def signup(request: Request, data: Annotated[SignupForm, Depends(json_or_f
|
||||
token = create_session(uid, max_age)
|
||||
response = action_result(request, "/feed", data={"username": username})
|
||||
response.set_cookie(
|
||||
key="session", value=token, max_age=max_age, httponly=True, samesite="lax"
|
||||
key="session",
|
||||
value=token,
|
||||
max_age=max_age,
|
||||
httponly=True,
|
||||
samesite="lax",
|
||||
secure=cookie_secure(request),
|
||||
)
|
||||
logger.info(f"User {username} signed up")
|
||||
audit.record(
|
||||
|
||||
Reference in New Issue
Block a user