LoginSignup
31
30

More than 5 years have passed since last update.

Railsのローカル環境でSSL(https)を使う

Posted at

FirefoxはHTML5のAudioの認証をhttp接続では「常に許可」を選べないのでローカルでSSLを簡単に使う方法を調べてみました。

やり方

sslの鍵を自分で作ってやる方法とかが紹介されてたんですが、めんどくさいのでもっと簡単な方法探したら

gem 'thin'

としてbundle それからthin start --ssl -p 3001 でローカルにSSLな環境ができました。とても簡単、素晴らしいですね。

あとはブラウザでhttps://localhost:3001にアクセスすると「証明書あかんやつやで。」と文句言われるので例外サイトに追加して置きましょう。

参考

31
30
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
31
30