on master help sign in
Ignore get params in preview server
04bd941Jasper Van der Jeugt
src/Hakyll/Web/Preview/Server.hs+1−1
@@ -37,7 +37,7 @@ static :: FilePath -- ^ Directory to serve
37static directory preServe = do
37static directory preServe = do
38 -- Obtain the path
38 -- Obtain the path
39 uri <- rqURI <$> getRequest
39 uri <- rqURI <$> getRequest
40− let filePath = replaceAll "\\?$" (const "") -- Remove trailing ?
40+ let filePath = replaceAll "\\?.*$" (const "") -- Remove trailing ?
41 $ replaceAll "#[^#]*$" (const "") -- Remove #section
41 $ replaceAll "#[^#]*$" (const "") -- Remove #section
42 $ replaceAll "^/" (const "") -- Remove leading /
42 $ replaceAll "^/" (const "") -- Remove leading /
43 $ urlDecode $ decode $ SB.unpack uri
43 $ urlDecode $ decode $ SB.unpack uri