ngx-cookie-service
ngx-cookie-service copied to clipboard
Ability to set a global/default domain for set and delete
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.
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
@sagrawal31 If possible send a PR, we will take a look.