From 5b3c5f3f4ecaa3e429bf7af25210c1d03b36494e Mon Sep 17 00:00:00 2001 From: Jacob Bennett Date: Fri, 22 Jan 2016 10:01:39 -0600 Subject: [PATCH 1/6] Don't return a login page to a JSON request Currently, any unauthorized API requests that pass through the `auth` middleware get a redirect to the login page. Adding the `wantsJson` flag to the conditional corrects this behavior. --- app/Http/Middleware/Authenticate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index d670fbfe..67abcaea 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -18,7 +18,7 @@ class Authenticate public function handle($request, Closure $next, $guard = null) { if (Auth::guard($guard)->guest()) { - if ($request->ajax()) { + if ($request->ajax() || $request->wantsJson()) { return response('Unauthorized.', 401); } else { return redirect()->guest('login'); From ccdba9ff6f8c96439e4f1bc57a9388997cf94f66 Mon Sep 17 00:00:00 2001 From: Mengdi Gao Date: Sun, 24 Jan 2016 00:55:54 +0800 Subject: [PATCH 2/6] Fix title heading level in readme.md --- readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readme.md b/readme.md index f67a6cf7..8f1a9496 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -## Laravel PHP Framework +# Laravel PHP Framework [![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) [![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.svg)](https://packagist.org/packages/laravel/framework) @@ -22,6 +22,6 @@ ## Security Vulnerabilities If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. -### License +## License The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) From 85e8d21ef2320977d6f205ef793dc595ed5638d3 Mon Sep 17 00:00:00 2001 From: Paul Vidal Date: Sat, 23 Jan 2016 12:02:55 -0500 Subject: [PATCH 3/6] handle authorization header --- public/.htaccess | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/.htaccess b/public/.htaccess index 8eb2dd0d..903f6392 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -13,4 +13,8 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] + + # Handle Authorization Header + RewriteCond %{HTTP:Authorization} . + RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] From db6bb6a36917e259fa655a8d8543daaa7199988a Mon Sep 17 00:00:00 2001 From: Martin Bean Date: Thu, 28 Jan 2016 15:38:52 +0000 Subject: [PATCH 4/6] Make Memcached options configurable. --- config/cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/cache.php b/config/cache.php index 379135b0..b00a9989 100644 --- a/config/cache.php +++ b/config/cache.php @@ -51,7 +51,9 @@ 'driver' => 'memcached', 'servers' => [ [ - 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100, + 'host' => env('MEMCACHED_HOST', '127.0.0.1'), + 'port' => env('MEMCACHED_PORT', 11211), + 'weight' => 100, ], ], ], From 2b1cc83171883af71f3eb073f3e2637887b700d3 Mon Sep 17 00:00:00 2001 From: jspringe Date: Thu, 28 Jan 2016 13:42:43 -0500 Subject: [PATCH 5/6] Changed localhost to 127.0.0.1 --- .env.example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.example b/.env.example index 031862be..afbeae44 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ APP_ENV=local APP_DEBUG=true APP_KEY=SomeRandomString -DB_HOST=localhost +DB_HOST=127.0.0.1 DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret @@ -11,7 +11,7 @@ CACHE_DRIVER=file SESSION_DRIVER=file QUEUE_DRIVER=sync -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379 From 89d693b5e611ee82a4c8d7db1b538ecf7625fcd5 Mon Sep 17 00:00:00 2001 From: david-ridgeonnet Date: Wed, 3 Feb 2016 14:34:03 +0000 Subject: [PATCH 6/6] Added default engine in configuration --- config/database.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/database.php b/config/database.php index 66e88a90..edd64256 100644 --- a/config/database.php +++ b/config/database.php @@ -62,6 +62,7 @@ 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, + 'engine' => null, ], 'pgsql' => [