Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takundao71/bcbdb57331ce32c08a5f9ac181f279f7 to your computer and use it in GitHub Desktop.
Save takundao71/bcbdb57331ce32c08a5f9ac181f279f7 to your computer and use it in GitHub Desktop.
railsでsession管理にredis使う場合の注意点
config/initializers/session_store.rbで
secureをつけるとhttpsでしか送信されないので注意
これはクッキーの仕様らしい
そして
:domain => :allにすると恐らく全てのサブドメインでクッキーが共有される
これはいいのだが
railsはtdl_lengthとやらが1しかないので
hogehoge.mogemoge.goge.jpとか「.」が多いとsessionが正しく作られず、おかしいことになるので注意
めっちゃはまったorz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment