MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / addCorsProxyHandler

Function addCorsProxyHandler

lib/handlers/cors-proxy.mjs:57–63  ·  view source on GitHub ↗
(app, path)

Source from the content-addressed store, hash-verified

55
56// Adds a CORS proxy handler to the application on the given path
57export default function addCorsProxyHandler (app, path) {
58 const corsHandler = cors(CORS_SETTINGS)
59 const proxyHandler = createProxyMiddleware(PROXY_SETTINGS)
60
61 debug.settings(`CORS proxy listening at ${path}?uri={uri}`)
62 app.get(path, extractProxyConfig, corsHandler, proxyHandler)
63}
64
65// Extracts proxy configuration parameters from the request
66function extractProxyConfig (req, res, next) {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected