serve-handler icon indicating copy to clipboard operation
serve-handler copied to clipboard

url parameter removed when cleanUrls: true

Open SylRob opened this issue 6 years ago • 1 comments

when the config cleanUrls is set to true (by default) and the requested URL is a file name with an extension and has some parameter in it ex:

/index_2.html?foo&bar=1

the server rewrite the url to

/index_2

and remove the extension AND the url parameters

those URL on the other hand works as intended :

/index_2?foo&bar=1
/?foo&bar=1

/folderName?foo&bar=1

/folderName/?foo&bar=1

question : is it as intended ?

If the response is "yes, you should set cleanUrls to false" then the README should be mentioning those cases

but I think the cleanUrls setting should set urls like :

/index.html?foo&bar=1 
to
/?foo&bar=1 

it would be more useful

SylRob avatar Jul 10 '19 07:07 SylRob

shameless self-promotion alert:
this feature is fixed in my @warren-bank/serve fork of serve

warren-bank avatar Feb 16 '22 01:02 warren-bank