Skip to content

Instantly share code, notes, and snippets.

@meriturva
Last active December 26, 2020 16:39
Show Gist options
  • Save meriturva/6af7e60e873943d55a1fff58dd1debef to your computer and use it in GitHub Desktop.
Save meriturva/6af7e60e873943d55a1fff58dd1debef to your computer and use it in GitHub Desktop.
@Component({
selector: 'hangfire-container',
templateUrl: './hangfire-container.component.html'
})
export class HangfireContainerComponent implements OnDestroy {
constructor(securityService: AbstractSecurityService) {
// Set cookie HangFireCookie
document.cookie = `HangFireCookie=${securityService.getCurrentToken()};Path=/`;
}
public ngOnDestroy() {
// remove cookie HangFireCookie
document.cookie = 'HangFireCookie=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment