The next generation of the Teknik Services. Written in ASP.NET.
https://www.teknik.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
647 B
28 lines
647 B
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); |
|
} |
|
} |
|
} |
|
}
|
|
|