currently the middleware select the target path via $target = $request->getRequestTarget(). This is not usefull in case of query parameter, that are not part of the real filename. I am using the middleware patch https://github.com/xperseguers/t3ext-fal-protect/pull/35 and want to view a file with myfile.txt but want to trigger the download (via a second middlware) via myfile.txt?download=1. The problem is, that the fal_protect extension do not find the file anymore, if there are quer parameter.
I suggest to select the target via $target = $request->getUri()->getPath()to solve this problem. Should I provide a pull request?
Hey everone,
currently the middleware select the target path via
$target = $request->getRequestTarget()
. This is not usefull in case of query parameter, that are not part of the real filename. I am using the middleware patch https://github.com/xperseguers/t3ext-fal-protect/pull/35 and want to view a file withmyfile.txt
but want to trigger the download (via a second middlware) viamyfile.txt?download=1
. The problem is, that the fal_protect extension do not find the file anymore, if there are quer parameter.I suggest to select the target via
$target = $request->getUri()->getPath()
to solve this problem. Should I provide a pull request?Regards, Tim