MCPcopy Create free account
hub / github.com/11ty/dev-server / getServerPath

Method getServerPath

server.js:777–783  ·  view source on GitHub ↗
(pathname)

Source from the content-addressed store, hash-verified

775 }
776
777 getServerPath(pathname) {
778 // duplicate slashes
779 if(this.options.pathPrefix.endsWith("/") && pathname.startsWith("/")) {
780 pathname = pathname.slice(1);
781 }
782 return `${this.options.pathPrefix}${pathname}`;
783 }
784
785 getServerUrlRaw(host, pathname = "", isRaw = true) {
786 if(!this._server || !this._serverProtocol) {

Callers 2

getServerUrlRawMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected