File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ export async function POST(request: Request) {
145145 const base = hostname ? `https://${ hostname } ` : 'https://localhost' ;
146146 const currentUrl = new URL ( url , base ) ;
147147
148- let urlPath = currentUrl . pathname === '/undefined' ? '' : currentUrl . pathname ;
148+ let urlPath = currentUrl . pathname === '/undefined' ? '' : currentUrl . pathname + currentUrl . hash ;
149149 const urlQuery = currentUrl . search . substring ( 1 ) ;
150150 const urlDomain = currentUrl . hostname . replace ( / ^ w w w ./ , '' ) ;
151151
@@ -169,7 +169,7 @@ export async function POST(request: Request) {
169169 const twclid = currentUrl . searchParams . get ( 'twclid' ) ;
170170
171171 if ( process . env . REMOVE_TRAILING_SLASH ) {
172- urlPath = urlPath . replace ( / ( . + ) \/ $ / , '$1 ' ) ;
172+ urlPath = urlPath . replace ( / \/ (? = ( # . * ) ? $ ) / , '' ) ;
173173 }
174174
175175 if ( referrer ) {
You can’t perform that action at this time.
0 commit comments