'how to set specific cookiet expiration date in Sinatra
Using sinatra/cookies, in an API, I can set the expiration date for all cookies of my application in the configuration:
set :cookie_options do
{
:secure => true,
:expires => Time.new(2022,10,15)
}
end
and then use it:
cookies[:__refresh_token__] = refresh_token
But I don't see how to set the expriration date only for this cookie, and not in the configuration for all cookies.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
