Skip to content

Commit

Permalink
Merge pull request #5498 from zhaojjiang/master
Browse files Browse the repository at this point in the history
将配置项 admin_https 的作用域限制到 /admin*
  • Loading branch information
jxlwqq committed Jan 5, 2022
2 parents e0e1748 + 6f5e80a commit 2bd3479
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/AdminServiceProvider.php
Expand Up @@ -99,7 +99,8 @@ public function boot()
*/
protected function ensureHttps()
{
if (config('admin.https') || config('admin.secure')) {
$is_admin = \Str::startsWith(request()->getRequestUri(), '/'.ltrim(config('admin.route.prefix'), '/'));
if ((config('admin.https') || config('admin.secure')) && $is_admin) {
url()->forceScheme('https');
$this->app['request']->server->set('HTTPS', true);
}
Expand Down

0 comments on commit 2bd3479

Please sign in to comment.