From 7fae521dbaee105139ea2823505b11be9511cdf4 Mon Sep 17 00:00:00 2001 From: Russell Ballestrini Date: Fri, 2 Jan 2026 12:54:30 -0500 Subject: [PATCH] Add code, font, and style file crawling support - Add CODE_EXTENSIONS for 50+ code file types (.py, .js, .rs, .go, etc.) - Add FONT_EXTENSIONS (.woff, .woff2, .ttf, .otf, .eot) - Add STYLE_EXTENSIONS (.css, .scss, .sass, .less) - Add corresponding MIME type sets for detection - Extract from tags (stylesheets, preload fonts) - Extract from - - """ +@app.get("/sandbox", response_class=HTMLResponse) +async def sandbox_page(lang: str = Cookie(None), accept_language: str = Header(None)): + """Sandbox page for uploading archives.""" + if not SANDBOX_MODE: + raise HTTPException(status_code=403, detail="Sandbox mode not enabled (NEOPIG_SANDBOX=1)") + language = get_lang(lang, accept_language) + html = layout("Sandbox", SANDBOX_CONTENT, extra_css=SANDBOX_CSS) + return inject_i18n(html, language) + + # ============================================================================ # Crawler API # ============================================================================