how to set secure flag for cookies inplay 2.1.0

2019-08-26 10:54发布

I am using play 2.1.0. I want to set a secure flag for request headers. I tried using application.session.cookie.secure=true in application.conf with https host. But still the security flag is not set in header.

Did not find much on internet.

1条回答
Juvenile、少年°
2楼-- · 2019-08-26 11:27

I don't have a link to accompanying Play documentation to hand, but the configuration property you're looking for is:

session.secure=true

You can take a look in the source on the 2.1.x branch to see how Play uses this property.

查看更多
登录 后发表回答