HttpOnlyPolicy Enum

Definition

Describes the HttpOnly behavior for cookies.

C#
public enum HttpOnlyPolicy
Inheritance
HttpOnlyPolicy

Fields

Name Value Description
None 0

The cookie does not have a configured HttpOnly behavior. This cookie can be accessed by JavaScript document.cookie API.

Always 1

The cookie is configured with a HttpOnly attribute. This cookie inaccessible to the JavaScript document.cookie API.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0