我试图使用 angular 设置 cookie 的参数。我可以设置过期日期和安全参数,但不能设置 HttpOnly 参数。我已经使用以下方法使用角度 cookie 服务即“cookie.service.d.ts”设置了“过期”和“安全”
set(name: string, value: string, expires?: number | Date, path?: string, domain?: string, secure?: boolean, sameSite?: 'Lax' | 'Strict'): void;
Run Code Online (Sandbox Code Playgroud)
我找不到如何设置 HttpOnly 参数,因为 angular cookie 服务不包含这样的参数。设置 HttpOnly 参数的最佳方法。
粉煤灰..
| 归档时间: |
|
| 查看次数: |
9085 次 |
| 最近记录: |