stevermeister / ngx-cookie-service

Angular (4.2+ ...12) service for cookies. Originally based on the `ng2-cookies` library.
https://www.npmjs.com/package/ngx-cookie-service
MIT License
547 stars 90 forks source link

Ability to set a global/default domain for set and delete #245

Closed sagrawal31 closed 1 year ago

sagrawal31 commented 2 years ago

Is your feature request related to a problem? Please describe

As of now, to use the cookieService.set or cookieService.delete, we have to always pass a custom parent domain which has 3 different values based on 3 different environments.

Describe the solution you'd like

To overcome this problem, we can provide a injector token to set a default value for the domain.an

Describe alternatives you've considered

Additional context

My angular app and backend API runs on two different subdomains under one domain so I have to set the cookie domain to my parent domain. So thought of raising this issue.

github-actions[bot] commented 2 years ago

Hello 👋 @sagrawal31
Thank you for raising an issue. We will investigate into the issue and get back to you as soon as possible. Please make sure you have given us as much context as possible.
Feel free to raise a PR if you can fix the issue

pavankjadda commented 2 years ago

@sagrawal31 If possible send a PR, we will take a look.

pavankjadda commented 1 year ago

@sagrawal31 any plans to send PR?

sagrawal31 commented 1 year ago

Apolgoies, @pavankjadda. Didn't get a chance so far. I can spend time in the first week of April if that's acceptable.

pavankjadda commented 1 year ago

Okay. I am closing this for now. Create PR when you are ready