Browse Source

Tweak wording.

Taylor Otwell 10 years ago
parent
commit
754ea2656c
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/Http/Middleware/VerifyCsrfToken.php

+ 3 - 3
app/Http/Middleware/VerifyCsrfToken.php

@@ -17,7 +17,7 @@ class VerifyCsrfToken implements Middleware {
 	 */
 	public function handle($request, Closure $next)
 	{
-		if ($this->isReadOnly($request) || $this->tokensMatch($request))
+		if ($this->isReading($request) || $this->tokensMatch($request))
 		{
 			return $next($request);
 		}
@@ -42,9 +42,9 @@ class VerifyCsrfToken implements Middleware {
 	 * @param  \Illuminate\Http\Request  $request
 	 * @return bool
 	 */
-	protected function isReadOnly($request)
+	protected function isReading($request)
 	{
-		return in_array($request->method(), ['GET', 'OPTIONS']);
+		return in_array($request->method(), ['HEAD', 'GET', 'OPTIONS']);
 	}
 
 }