新手问题 新手教程中 post 请求里 set cookie 为啥失败了

callmewhy · March 24, 2019 · Last by jicheng1014 replied at March 25, 2019 · 1367 hits

在 sof 上有类似问题: https://stackoverflow.com/questions/44557460/cookies-not-working-rails-5-1-1

表现是:

get '/login' => 'users#login' 的时候,login 中 cookies[:xxx] = xxx 是没问题的 post '/login' => 'users#login' 的时候,login 中 cookies[:xxx] = xxx 就失效了,response header 里没有 Set-Cookie

是 post 请求的 set cookie 有啥特别的吗

我这刚试了 有呀

You need to Sign in before reply, if you don't have an account, please Sign up first.