diff --git a/src/middlewares.ts b/src/middlewares.ts index 62cc7a3..8daa78c 100644 --- a/src/middlewares.ts +++ b/src/middlewares.ts @@ -16,22 +16,13 @@ const hashPattern = /(?:^|.*?\.)hash-([a-f0-9]+)\./; function assembleSubdomainUrlForHash(req: any, commitHash: CommitHash) { const protocol = req.secure || req.headers.host.indexOf( 'calypso.live' ) > -1 ? "https" : "http"; - const query = - Object.keys( req.query ) - .reduce( - ( q, key ) => key === 'branch' ? q : q.concat( `${ encodeURIComponent( key ) }=${ encodeURIComponent( q[ key as keyof {} ] ) }` ), - [] - ) - .join( '&' ); - return ( protocol + "://hash-" + commitHash + "." + stripCommitHashSubdomainFromHost(req.headers.host) + - req.path + - query ? `?${ query }` : '' + req.path ); }