uhhh lots of things
All checks were successful
Datadog Software Composition Analysis / Datadog SBOM Generation and Upload (push) Successful in 16s
Datadog Secrets Scanning / Datadog Static Analyzer (push) Successful in 14s
Datadog Static Analysis / Datadog Static Analyzer (push) Successful in 24s

This commit is contained in:
2025-03-08 11:17:24 -05:00
parent 0a6d5b8a90
commit c6f36d0408
7 changed files with 222 additions and 44 deletions

13
main.py
View File

@ -21,7 +21,13 @@ def main():
r = RouteManager(c)
t = TemplateHelpers(c)
server = Server()
server = Server(
debug=c.debug,
host=c.listen_address,
port=c.listen_port,
access_log=c.access_log,
workers=c.max_threads,
)
server.register_template_function("get_sibling_content_files", t.get_sibling_content_files)
server.register_template_function("get_text_document_preview", t.get_text_document_preview)
@ -33,8 +39,9 @@ def main():
server.register_route("/", r.default_route, defaults={"path": ""})
server.register_route("/<path:path>", r.default_route)
file_manager_bp = create_filemanager_blueprint(c.content_dir, url_prefix='/admin', auth_password="password")
server.app.register_blueprint(file_manager_bp)
if c.admin_browser:
file_manager_bp = create_filemanager_blueprint(c.content_dir, url_prefix='/admin', auth_password=c.admin_password)
server.app.register_blueprint(file_manager_bp)
try:
server.run()