mirror of
https://github.com/NoCLin/LightMirrors
synced 2025-12-16 14:10:27 +08:00
12 lines
240 B
Python
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)
|