ngx-cookie-service icon indicating copy to clipboard operation
ngx-cookie-service copied to clipboard

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

Open sagrawal31 opened this issue 1 year ago • 2 comments

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

  • 1st alternative - I'll raise a PR (as my time permits) because this is a simple feature.
  • 2nd alternative- I'll extend the CookieService and replace the provider.

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.

sagrawal31 avatar Sep 07 '22 17:09 sagrawal31

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

github-actions[bot] avatar Sep 07 '22 17:09 github-actions[bot]

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

pavankjadda avatar Sep 07 '22 21:09 pavankjadda