Download ADOOR_ACE/node_modules/express-http-proxy/app/steps/resolveProxyReqPath.js from thisisAce/adoor-store: direct link, hf CLI and curl.
- Browser
- Download file 601 Bytes
-
https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/express-http-proxy/app/steps/resolveProxyReqPath.js
- Command line
-
hf download hf://thisisAce/adoor-store/ADOOR_ACE/node_modules/express-http-proxy/app/steps/resolveProxyReqPath.js
-
curl -L -o resolveProxyReqPath.js https://huggingface.co/thisisAce/adoor-store/resolve/main/ADOOR_ACE/node_modules/express-http-proxy/app/steps/resolveProxyReqPath.js
601 Bytes
| ; | |
| var url = require('url'); | |
| var debug = require('debug')('express-http-proxy'); | |
| function defaultProxyReqPathResolver(req) { | |
| return url.parse(req.url).path; | |
| } | |
| function resolveProxyReqPath(container) { | |
| var resolverFn = container.options.proxyReqPathResolver || defaultProxyReqPathResolver; | |
| return Promise | |
| .resolve(resolverFn(container.user.req)) | |
| .then(function (resolvedPath) { | |
| container.proxy.reqBuilder.path = resolvedPath; | |
| debug('resolved proxy path:', resolvedPath); | |
| return Promise.resolve(container); | |
| }); | |
| } | |
| module.exports = resolveProxyReqPath; | |