finishing with Phase 2

This commit is contained in:
2026-08-04 19:05:38 -05:00
parent b1ae2a9827
commit 8a6833def0
10 changed files with 43 additions and 23 deletions
-13
View File
@@ -423,19 +423,6 @@ def api_packs_latest(request, namespace, pack_id):
})
def vanilla_asset(request, asset_path):
"""Serve a bundled Minecraft vanilla resource (e.g. entity textures) — gated."""
if not asset_path or asset_path.startswith('/') or '..' in asset_path.split('/'):
raise Http404
full = Path(settings.MEDIA_ROOT) / 'vanilla' / asset_path
if not full.is_file():
raise Http404
content_type = mimetypes.guess_type(asset_path)[0] or 'application/octet-stream'
response = HttpResponse(full.read_bytes(), content_type=content_type)
response['Cache-Control'] = 'public, max-age=86400'
return response
def guide_doc(request, slug, version_id, file_uuid):
"""Render one markdown guide document server-side (used by the switcher)."""
version = get_object_or_404(