1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00
Teknik/Utilities/CookieHelper.cs

26 lines
605 B
C#
Raw Normal View History

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 (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);
}
}
}
}