mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
29 lines
647 B
C#
29 lines
647 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Teknik.Utilities
|
|
{
|
|
public static class CookieHelper
|
|
{
|
|
public static string GenerateCookieDomain(string domain, bool local, bool dev)
|
|
{
|
|
#if DEBUG
|
|
return null;
|
|
#endif
|
|
if (local) // localhost
|
|
{
|
|
return null;
|
|
}
|
|
else if (dev) // dev.example.com
|
|
{
|
|
return string.Format("dev.{0}", domain);
|
|
}
|
|
else // A production instance
|
|
{
|
|
return string.Format(".{0}", domain);
|
|
}
|
|
}
|
|
}
|
|
}
|