3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

laravel-adminのSSL化方法

Posted at

Configの設定を変えるだけで可能

/config/admin.php
'https' => env('ADMIN_HTTPS', false),

local環境もhttpsで構わないという場合は第二引数をtrueにする。

本番環境やstg環境だけSSL化したい場合(こちらの方がたぶん多い)、環境変数でADMIN_HTTPS を定義してtrue にする。
これだけでSSL化されます。あら、便利。

あくまでもlaravel-adminの設定なので、管理画面の他に公開画面などのviewを作っている場合は別途そちらもSSL化する必要があります。
ミドルウェア用意したり、リダイレクトさせたり。
https://qiita.com/Yorinton/items/50b9c8e3102ac661f08c

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?