how to set secure flag for cookies inplay 2.1.0

ぐ巨炮叔叔 提交于 2019-12-25 04:26:45

问题


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:


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.



来源:https://stackoverflow.com/questions/22448002/how-to-set-secure-flag-for-cookies-inplay-2-1-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!