feat: Add license and attribution routes, update templates and documentation
- Added a new license route to serve the LGPL license text. - Introduced a new attribution page to acknowledge third-party software used in the project. - Updated the base HTML template to include a link to the attribution page. - Included the license router in the main application router. - Added the license text file for LGPL to the static licenses directory. - Updated the NOTICE file to include detailed attributions for third-party libraries. - Added a new requirements-dev.txt for license compliance checking. - Updated the requirements.txt to clarify the LGPL license for Paramiko.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from fastapi.responses import PlainTextResponse, HTMLResponse
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/licenses/lgpl.txt", response_class=PlainTextResponse)
|
||||
async def get_lgpl_license():
|
||||
"""
|
||||
Serve the LGPL license text file
|
||||
"""
|
||||
license_path = Path("frontend/static/licenses/lgpl.txt")
|
||||
if not license_path.exists():
|
||||
raise HTTPException(status_code=404, detail="License file not found")
|
||||
|
||||
with open(license_path, "r") as f:
|
||||
return f.read()
|
||||
Reference in New Issue
Block a user