LoginSignup
0
0

More than 5 years have passed since last update.

RubyOnRailsで建てたlocalserverにhttps接続する場合

Last updated at Posted at 2017-12-06

railsで建てたlocalhostにhttps接続する簡単な方法

今回開発でRailsで作ったアプリにスマホからhttps接続する必要があったので色々探しました。

-https://github.com/jugyo/tunnels
↑を使います。

使用OS:mac sierra
Railsver:4系,5系

$ gem install tunnels

gem installします

$ sudo tunnels 443 3000 #pcでhttpsしたい時

$ sudo tunnels 10.☓.☓.☓:443 127.0.0.1:3000 #スマホでhttpsしたい時。☓の部分は自分のIPを調べよう

接続する時

https://localhost:443 #PC
https://10.x.x.x:443 #スマホ

で接続できます。

ブラウザの警告が出ますが、無視して開いてOKです。

これで接続すればオレオレ証明書系を使わなくて簡単に出来る方法です。

0
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
0
0