Skip to content

Commit

Permalink
Merge pull request #20 from TheBnl/configure-domain
Browse files Browse the repository at this point in the history
Add option for domain configuration
  • Loading branch information
TheBnl authored Oct 1, 2020
2 parents 013dda8 + 7978891 commit 857d593
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CookieConsent.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ public static function getConsent()
public static function setConsent($consent)
{
$consent = array_filter(array_unique(array_merge($consent, self::config()->get('required_groups'))));
Cookie::set(CookieConsent::COOKIE_NAME, implode(',', $consent), 730, null, null, false, false);
$domain = self::config()->get('domain') ?: null;
Cookie::set(CookieConsent::COOKIE_NAME, implode(',', $consent), 730, null, $domain, false, false);
}

/**
Expand Down

0 comments on commit 857d593

Please sign in to comment.