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.

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace Teknik.Utilities
  5. {
  6. public static class CookieHelper
  7. {
  8. public static string GenerateCookieDomain(string domain, bool local, bool dev)
  9. {
  10. #if DEBUG
  11. return null;
  12. #endif
  13. if (local) // localhost
  14. {
  15. return null;
  16. }
  17. else if (dev) // dev.example.com
  18. {
  19. return string.Format("dev.{0}", domain);
  20. }
  21. else // A production instance
  22. {
  23. return string.Format(".{0}", domain);
  24. }
  25. }
  26. }
  27. }