2024-02-24 10:09:14 +08:00

12 lines
240 B
Python

from starlette.requests import Request
from proxy.direct import direct_proxy
BASE_URL = "https://registry.npmjs.org/"
async def npm(request: Request):
path = request.url.path
return await direct_proxy(request, BASE_URL + path)