I have a Rails application that sets a cookie and redirects it to another server after the user logs in. However, the cookie that the Rails application installs is not considered by the server for any reason. I tried setting http_only to false, but I still can’t see the cookie, unless the domain matches my Rails application. Here is the code I use to set the cookie:
cookies[:dev_appserver_login] = { :value => "#{email}:#{nick}:#{admin}:#{hsh}", :domain => "webserver-to-redirect-to", :expires => 30.days.from_now } redirect_to session[:dest_url]
If I manually create a cookie with a web developer extension in Firefox, it works fine, but not when Rails does it. Any ideas?
? "" , , a.example.com b.example.com, "domain" .example.com, b.example.com, .
( , .com TLD, , , cookie a.example.com b.somewhereelse.com, , whereelse.com.)
cookie, Rails.
, cookie. IP, , -, "" IP-, .
, /etc/hosts .
127.0.0.1 app1.localdev.com, app2.localdev.com
, cookie, .localdev.com( ), localdev.com .
( , ) - -, appdomain.com 1 appdomain.com/other -app/ . cookie.
Source: https://habr.com/ru/post/1698605/More articles:Простой поиск: передача переменной формы в URI с помощью CodeIgniter - phpHow to read an Open Office spreadsheet? - groovyHow to transfer model data from view state and action state in Spring Web Flow 2 - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1698603/how-do-i-work-around-this-error-while-copying-svn-repository-by-svnsync&usg=ALkJrhgfPFGh0Ak45o5PrwVh6UfHreGiHQQuestion about missing identifiers in an identity column in MSSQL - sql-serverСжатие кэша памяти - cachingCombine facts from different sources? Or download separately? - database-designSQL stored procedure temporary memory issue - sqlПриродный язык/Текстовое горное дело и Reddit/сайт социальных новостей - nlpAnyone who uses a third-party Windows registry editor that they recommend to other users? - windowsAll Articles