How do I set the HTTPOnly flag?
the TCookie does not have any method or property to specify the HTTPOnly flag.
How do I set the HTTPOnly flag? the TCookie does not have any method
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you talking about TCookie in HttpApp.pas then there is no built in property to support HttpOnly.
You can look at httpApp.pas at the
TCookie.GetHeaderValue: string;implementation to verify.However a Cookie is just something set in the Header and TWebResponse has a CustomHeaders
property. Where you could Call
Response.CustomHeaders.Add(MyCookieValue);The following class is a modified version of TCookie to support HttpOnly that you can use to generate the cookie correctly.