Skip to content

Commit

Permalink
Add $request->isHEAD()
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent authored Dec 3, 2017
1 parent 4420a6e commit eca4937
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Middleware/TrailingSlashRedirector.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class TrailingSlashRedirector implements HTTPMiddleware
{
public function process(HTTPRequest $request, callable $delegate)
{
if ($request && $request->isGET()) {
if ($request && ($request->isGET() || $request->isHEAD())) {
$requested_url = $_SERVER['REQUEST_URI'];
$expected_url = rtrim(Director::baseURL() . $request->getURL(), '/') . '/';
$urlPathInfo = pathinfo($requested_url);
Expand Down

0 comments on commit eca4937

Please sign in to comment.