MCPcopy Create free account
hub / github.com/cameri/nostream / getPublicPathPrefix

Function getPublicPathPrefix

src/utils/http.ts:110–112  ·  view source on GitHub ↗
(request: IncomingMessage, settings: Settings)

Source from the content-addressed store, hash-verified

108}
109
110export const getPublicPathPrefix = (request: IncomingMessage, settings: Settings): string => {
111 return getTrustedForwardedPathPrefix(request, settings) || getRelayUrlPathPrefix(settings.info?.relay_url)
112}
113
114export const joinPathPrefix = (prefix: string, path: string): string => {
115 const normalizedPrefix = prefix.replace(/\/+$/, '')

Callers 6

http.spec.tsFile · 0.90
handleRequestMethod · 0.90
handleRequestMethod · 0.90
rootRequestHandlerFunction · 0.90
getTermsRequestHandlerFunction · 0.90
getPrivacyRequestHandlerFunction · 0.90

Calls 2

getRelayUrlPathPrefixFunction · 0.85

Tested by

no test coverage detected