New front-end Launch Chat API Manage Sources Enable re-embedding of all contents Sources can be added without a notebook now Improved settings Enable model selector on all chats Background processing for better experience Dark mode Improved Notes Improved Docs: - Remove all Streamlit references from documentation - Update deployment guides with React frontend setup - Fix Docker environment variables format (SURREAL_URL, SURREAL_PASSWORD) - Update docker image tag from :latest to :v1-latest - Change navigation references (Settings → Models to just Models) - Update development setup to include frontend npm commands - Add MIGRATION.md guide for users upgrading from Streamlit - Update quick-start guide with correct environment variables - Add port 5055 documentation for API access - Update project structure to reflect frontend/ directory - Remove outdated source-chat documentation files
24 lines
591 B
Python
24 lines
591 B
Python
"""
|
|
Authentication router for Open Notebook API.
|
|
Provides endpoints to check authentication status.
|
|
"""
|
|
|
|
import os
|
|
|
|
from fastapi import APIRouter
|
|
|
|
router = APIRouter(prefix="/auth", tags=["auth"])
|
|
|
|
|
|
@router.get("/status")
|
|
async def get_auth_status():
|
|
"""
|
|
Check if authentication is enabled.
|
|
Returns whether a password is required to access the API.
|
|
"""
|
|
auth_enabled = bool(os.environ.get("OPEN_NOTEBOOK_PASSWORD"))
|
|
|
|
return {
|
|
"auth_enabled": auth_enabled,
|
|
"message": "Authentication is required" if auth_enabled else "Authentication is disabled"
|
|
}
|