Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

How set the Domain attributes for the session cookie #6341


User avatar
0
velu created

Hi,

We are using .CORE and angular 6

how Set the Domain attributes for the session cookie

It was observed that session cookie attribute has been set to root and Path Samesite, Secure flag and HTTP Only attribute was not set in the application.

Please help us to solve this

Thanks


6 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    You can override abp.utils.setCookieValue.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @velu

    Have you tried @aaron's suggestion ?

  • User Avatar
    0
    velu created

    No,

    We need an example to do this.

    Can you please help us to solve this.

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @velu

    The value Path of the cookie is retrieved from abp.appPath javascript variable, you can change it but it might cause other problems.

    So, I suggest you to search for abp.utils.setCookieValue usages in typescript files and set the path parameter as you want.

  • User Avatar
    0
    velu created

    HI,

    is there any way to set HTTP-Only attribute to cookies in Angular.

    Thanks

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @velu,

    It is not possible I guess https://stackoverflow.com/a/14691716/6681451. If you set the cookie as http-only, Angular app can't use it.