MCPcopy Index your code
hub / github.com/coder/code-server / ensureProxyEnabled

Function ensureProxyEnabled

src/node/http.ts:81–88  ·  view source on GitHub ↗
(req: express.Request, _?: express.Response, next?: express.NextFunction)

Source from the content-addressed store, hash-verified

79 * Throw an error if proxy is not enabled. Call `next` if provided.
80 */
81export const ensureProxyEnabled = (req: express.Request, _?: express.Response, next?: express.NextFunction): void => {
82 if (!proxyEnabled(req)) {
83 throw new HttpError("Forbidden", HttpCode.Forbidden)
84 }
85 if (next) {
86 next()
87 }
88}
89
90/**
91 * Return true if proxy is enabled.

Callers 3

domainProxy.tsFile · 0.90
proxyFunction · 0.90
wsProxyFunction · 0.90

Calls 1

proxyEnabledFunction · 0.85

Tested by

no test coverage detected